1
0
mirror of https://github.com/drone/drone-cli.git synced 2026-01-20 09:51:34 +01:00
drone-cli/vendor/github.com/google/go-jsonnet
2018-10-09 11:18:46 -07:00
..
ast added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
parser added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
testdata adds experimental jsonnet command 2018-05-14 11:03:05 -07:00
.gitignore update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
.gitmodules update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
.travis.yml update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
builtins.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
CONTRIBUTING update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
desugarer.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
doc.go adds experimental jsonnet command 2018-05-14 11:03:05 -07:00
error_formatter.go adds experimental jsonnet command 2018-05-14 11:03:05 -07:00
imports.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
interpreter.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
key.json.enc update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
LICENSE adds experimental jsonnet command 2018-05-14 11:03:05 -07:00
mutually_recursive_defaults.input update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
README.md update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
release.sh update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
reset_stdast_go.sh update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
runtime_error.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
static_analyzer.go adds experimental jsonnet command 2018-05-14 11:03:05 -07:00
std.thisFile.jsonnet update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
tests.sh update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
thunks.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
travisBuild.sh update drone exec to 0.9 yaml and runtime 2018-10-09 11:18:46 -07:00
value.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00
vm.go added drone jsonnet stdlib 2018-08-26 19:40:06 -07:00

go-jsonnet

GoDoc Widget Travis Widget Coverage Status Widget

This an implementation of Jsonnet in pure Go. It is feature complete but is not as heavily exercised as the Jsonnet C++ implementation. Please try it out and give feedback.

This code is known to work on Go 1.8 and above. We recommend always using the newest stable release of Go.

Build instructions

export GOPATH=$HOME/go-workspace
mkdir -pv $GOPATH
go get github.com/google/go-jsonnet
cd $GOPATH/src/github.com/google/go-jsonnet
cd jsonnet
go build
./jsonnet /dev/stdin <<< '{x: 1, y: self.x} + {x: 10}'
{
   "x": 10,
   "y": 10
}

Running tests

./tests.sh  # Also runs `go test ./...`

Implementation Notes

We are generating some helper classes on types by using http://clipperhouse.github.io/gen/. Do the following to regenerate these if necessary:

go get github.com/clipperhouse/gen
go get github.com/clipperhouse/set
export PATH=$PATH:$GOPATH/bin  # If you haven't already
go generate

Generated Stdlib

To regenerate the standard library, do:

./reset_stdast_go.sh && go run cmd/dumpstdlibast.go