Implement functions, arrays, maps, and while loops. Document and clean up code.
This commit is contained in:
@@ -80,4 +80,4 @@ func doShellScript(args map[string]interface{}) (interface{}, error) {
|
||||
} else {
|
||||
return nil, errors.New("script not provided")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func main() {
|
||||
log.Fatalln("Error parsing file:", err)
|
||||
}
|
||||
scpt.AddFuncs(scpt.FuncMap{
|
||||
"print": scptPrint,
|
||||
"print": scptPrint,
|
||||
"display-dialog": displayDialog,
|
||||
"do-shell-script": doShellScript,
|
||||
})
|
||||
@@ -43,4 +43,4 @@ func scptPrint(args map[string]interface{}) (interface{}, error) {
|
||||
}
|
||||
fmt.Println(val)
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user