Skip to content

Commit 66737e4

Browse files
abhimanyu003cardoe
authored andcommitted
docs: updating readme file
1 parent a93ff90 commit 66737e4

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

go/understackctl/README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# understack
1+
# understackctl
22

3-
UnderStack CLI helps quickly generate a deployment repository.
3+
understackctl is a CLI that helps quickly generate a deployment repository.
44

55
## How to use
66

@@ -18,7 +18,7 @@ export UC_DEPLOY_EMAIL="<your_email>"
1818
export UC_AIO=yes
1919
```
2020

21-
* Run
21+
* Quick Run
2222

2323
```
2424
go run *.go quickstart
@@ -27,6 +27,33 @@ go run *.go help
2727

2828
* Commit all changes to the undercloud-deploy repo in your branch
2929

30+
## Build
31+
32+
* Local build `make build` ( this will only build binary for you local os ).
33+
* Cross-Platform build `make build-all` ( build for linux-mac-windows )
34+
35+
## Development
36+
37+
* To add a new command, create a function like this.
38+
39+
```go
40+
func NewCmdMyCommand() *cobra.Command {
41+
return &cobra.Command{
42+
Use: "mycommand",
43+
Short: "This will run my command",
44+
Long: "This will run my command",
45+
Run: myCommandFunction,
46+
}
47+
}
48+
```
49+
50+
* After that register it to `cmd/root/root.go`
51+
52+
```go
53+
func init() {
54+
rootCmd.AddCommand(deploy.NewCmdMyCommand())
55+
}
56+
```
3057

3158
## Contributing
3259

0 commit comments

Comments
 (0)