gofsm

module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: Apache-2.0

README

gofsm

CI License GitHub release codecov Made by Alexey Burmistrov

gofsm is a command line tool that generates finite state machine for Go struct.

Usage

Usage: gofsm gen -p ./examples/transitions -s Order -f State -o order_fsm.go -t ./examples/transitions/transitions.json
   --package, -p      package where struct is located (default: default is current dir(.))
   --struct, -s       struct name
   --field, -f        state field of struct
   --output, -o       output file name (default: default srcdir/<struct>_fsm.go)
   --transitions, -t  path to file with transitions
   --noGenerate, -g   don't put //go:generate instruction to the generated code (default: false)
   --graph-output, -a value  path to transition graph file in dot format

This will generate finite state machine for struct Order with transitions defined in ./examples/transitions/transitions.json file. Transition graph will be generated from transitions file and output will be in dot format

Install

Using go
go get -u github.com/MrEhbr/gofsm/cmd/gofsm
Download releases

https://github.com/MrEhbr/gofsm/releases

License

© 2020 [Alexey Burmistrov]

Licensed under the Apache License, Version 2.0 (LICENSE). See the COPYRIGHT file for more details.

SPDX-License-Identifier: Apache-2.0

Directories

Path Synopsis
cmd
gofsm command
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL