- go cli with a library of
spf13/cobra
$ pwd
-> (your go-cli dir)
$ go install go-cli
$ go install github.com/matsu0228/go-cli
ls $GOPATH\bin
$ go-cli -h
-> check all command
$ go-cli parsertest hoge
$ go-cli parsertest hoge -t 5
-> example of argment parser
- sandbox/example
- create target_file_test.go
import "testing"
- exec go test
go test packagePath # cf. go test github.com/hoge/moge パッケージを指定
go test -run '' # カレントディレクトリ内の全てのテストを実行
go test -run Foo # Fooを含むテスト関数を実行