Candi, a framework for Membangun Candi
project in Golang
Made with
Install CLI
For linux:
$ wget -O candi https://storage.googleapis.com/agungdp/bin/candi/candi-linux && chmod +x candi
$ ./candi
For macOS:
$ wget -O candi https://storage.googleapis.com/agungdp/bin/candi/candi-osx && chmod +x candi
$ ./candi
For windows:
https://storage.googleapis.com/agungdp/bin/candi/candi-x64.exe (64 bit)
or
https://storage.googleapis.com/agungdp/bin/candi/candi-x86.exe (32 bit)
Or build binary from source:
$ go get -u pkg.agungdwiprasetyo.com/candi/cmd/candi
$ candi
Flag options:
$ candi --help
Usage of candi:
-libraryname string
define library name (default "pkg.agungdwiprasetyo.com/candi")
-output string
directory to write project to (default is service name)
-packageprefix string
define package prefix
-protooutputpkg string
define generated proto output target (if using grpc), with prefix is your go.mod
-scope string
set scope (1 for init service, 2 for add module(s)
-servicename string
define service name
-withgomod
generate go.mod or not (default true)
Create new service or add module in existing service
$ candi
Build and run service
$ cd {{service_name}}
$ make run
If include GRPC handler, run $ make proto
for generate rpc files from proto (must install protoc
compiler min version libprotoc 3.14.0
)
Service handlers example:
Todo