Hello World is a simple CLI application written in Golang with Cobra.
Install Go in 1.12 version minimum.
Download and install tools used by make
$ go run mage.go -d tools
Download the dependences locked
$ go run mage.go go:deps
Release the dev actions
$ go run mage.go
Generate configuration
bin/hello-world config new > helloworld.local.conf.toml
Execute unit test and display code coverage:
$ go run mage.go go:test go:analyzecoverage
go run mage.go
bin/hello-world --help
Arguments
The hello-world app need some parameters :
ARG | Pattern | Description |
---|---|---|
help | application help | |
--config | start --config path/to/file | path to the config file |
config new | generate a new config | |
client | query the gRPC server | |
server | gRPC serverwith services | |
--feature-gates | key=value | activate or deactivate a feature |
$ bin/hello-world server grpc
$ bin/hello-world client greeter sayHello -s 127.0.0.1:5555 <<< '{"name": "me"}'
{
"message": "hello me"
}%