mirror of
https://github.com/google/go-jsonnet.git
synced 2025-08-07 06:47:16 +02:00
This is mostly so that I can add it as the test module to be used in the bazel registry presubmit
20 lines
297 B
Go
20 lines
297 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
gjs "github.com/google/go-jsonnet"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Printf("Example using go jsonnet (%s)\n", gjs.Version())
|
|
|
|
vm := gjs.MakeVM()
|
|
out, err := vm.EvaluateFile("example.jsonnet")
|
|
if err != nil {
|
|
fmt.Printf("%v\n", err)
|
|
} else {
|
|
fmt.Printf("%s", out)
|
|
}
|
|
}
|