go get -u github.com/eszanon/go-states-language
package main
import (
"flag"
"fmt"
"os"
"gitlab.com/lumminy/pocs/go-states-language/pkg/workflow"
)
func main() {
jsonFile := flag.String("f", "", "JSON-based Amazon States Language file location")
flag.Parse()
if *jsonFile == "" {
fmt.Println("Invalid JSON-based Amazon States Language file")
os.Exit(1)
}
flow, err := workflow.Validate(jsonFile)
if err != nil {
fmt.Println("Workflow not valid. See errors: ", err.Error())
os.Exit(1)
}
fmt.Println("The workflow is valid.")
fmt.Printf("flow: %#v", flow)
}
Read the documentation for other functions
You know =)