Skip to content

Commit

Permalink
refactor(json): move go.starlark.net/starlarkjson -> go.starlark.net/…
Browse files Browse the repository at this point in the history
…lib/json (google#367)

and keep an alias package in place for backwards compatibility
  • Loading branch information
b5 authored Apr 16, 2021
1 parent 7a1108e commit 1607a96
Show file tree
Hide file tree
Showing 5 changed files with 492 additions and 476 deletions.
4 changes: 2 additions & 2 deletions cmd/starlark/starlark.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import (
"strings"

"go.starlark.net/internal/compile"
"go.starlark.net/lib/json"
"go.starlark.net/lib/math"
"go.starlark.net/lib/time"
"go.starlark.net/repl"
"go.starlark.net/resolve"
"go.starlark.net/starlark"
"go.starlark.net/starlarkjson"
)

// flags
Expand Down Expand Up @@ -92,7 +92,7 @@ func doMain() int {

// Ideally this statement would update the predeclared environment.
// TODO(adonovan): plumb predeclared env through to the REPL.
starlark.Universe["json"] = starlarkjson.Module
starlark.Universe["json"] = json.Module
starlark.Universe["time"] = time.Module
starlark.Universe["math"] = math.Module

Expand Down
Loading

0 comments on commit 1607a96

Please sign in to comment.