Add hello world example
This commit is contained in:
1
examples/helloworld/que.txt.orig
Normal file
1
examples/helloworld/que.txt.orig
Normal file
@@ -0,0 +1 @@
|
||||
world
|
||||
1
examples/helloworld/root
Normal file
1
examples/helloworld/root
Normal file
@@ -0,0 +1 @@
|
||||
hello, {{.que}}!
|
||||
2
examples/helloworld/root.vis
Normal file
2
examples/helloworld/root.vis
Normal file
@@ -0,0 +1,2 @@
|
||||
LOAD que 5
|
||||
MAP que
|
||||
@@ -124,7 +124,8 @@ func main() {
|
||||
}
|
||||
ctx := context.Background()
|
||||
en := engine.NewEngine(cfg, &st, rs, ca, ctx)
|
||||
err := en.Init(ctx)
|
||||
var err error
|
||||
_, err = en.Init(ctx)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "engine init fail: %v\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
@@ -72,7 +72,8 @@ func main() {
|
||||
ctx := context.Background()
|
||||
ctx = context.WithValue(ctx, "SessionId", sessionId)
|
||||
en := engine.NewEngine(cfg, &st, rs, ca, ctx)
|
||||
err := en.Init(ctx)
|
||||
var err error
|
||||
_, err = en.Init(ctx)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "engine init fail: %v\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user