Contributing
See CONTRIBUTING.md for the full contributing guide.
Quick start
git clone https://github.com/vngcloud/greennode-cli.git
cd greennode-cli/go
go build -o grn .
./grn --version
Adding a new command
- Create
cmd/vks/<command_name>.go - Define
cobra.Commandwith Use, Short, RunE - Register in
cmd/vks/vks.go - Add
validator.ValidateID()for ID args - Add
--dry-runfor create/update/delete - Create
docs/commands/vks/<command-name>.md— command reference page - Add entry to
docs/commands/vks/index.mdtable - Add nav entry to
mkdocs.yml
Adding a new service
- Create
cmd/<service>/directory - Create parent command with
cobra.Command - Register in
cmd/root.go