Skip to content

A golang command-line tool and library that provides a validator and a parser for Amazon States Language JSON files.

License

Notifications You must be signed in to change notification settings

eszanon/go-states-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

go-states-language

TravisCI Build Status

GoDoc Go Report Card

Installation

go get -u github.com/eszanon/go-states-language

Example

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

Contributing

You know =)

About

A golang command-line tool and library that provides a validator and a parser for Amazon States Language JSON files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published