diff options
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | golings/cmd/hint.go | 2 | ||||
-rw-r--r-- | golings/cmd/run.go | 6 |
3 files changed, 16 insertions, 8 deletions
@@ -71,6 +71,12 @@ To compile and run all the exercises: golings verify ``` +If you need help with CLI commands: + +```sh +golings --help +``` + A demo running the command `golings run <exercise name>` ![demo](misc/demo.gif) @@ -81,11 +87,11 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) ## Learning resources -* [Golang official tutorial](https://go.dev/doc/tutorial/) -* [Go by example](https://gobyexample.com) -* [Aprenda Go](https://www.youtube.com/playlist?list=PLCKpcjBB_VlBsxJ9IseNxFllf-UFEXOdg) +- [Golang official tutorial](https://go.dev/doc/tutorial/) +- [Go by example](https://gobyexample.com) +- [Aprenda Go](https://www.youtube.com/playlist?list=PLCKpcjBB_VlBsxJ9IseNxFllf-UFEXOdg) ## Other 'lings -* [rustlings](https://github.com/rust-lang/rustlings) -* [ziglings](https://github.com/ratfactor/ziglings) +- [rustlings](https://github.com/rust-lang/rustlings) +- [ziglings](https://github.com/ratfactor/ziglings) diff --git a/golings/cmd/hint.go b/golings/cmd/hint.go index 64d28d1..edc0845 100644 --- a/golings/cmd/hint.go +++ b/golings/cmd/hint.go @@ -10,7 +10,7 @@ import ( func HintCmd(infoFile string) *cobra.Command { return &cobra.Command{ - Use: "hint", + Use: "hint <exercise name>", Short: "Get a hint for an exercise", Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { diff --git a/golings/cmd/run.go b/golings/cmd/run.go index 7d5fef8..0c07720 100644 --- a/golings/cmd/run.go +++ b/golings/cmd/run.go @@ -13,8 +13,10 @@ import ( func RunCmd(infoFile string) *cobra.Command { return &cobra.Command{ - Use: "run [exercise]", - Short: "Run a single exercise", + Use: "run next | <exercise name>", + Short: "Run a single exercise", + Long: `example next pending exercise : golings run next +example specific exercise : golings run variables1`, Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), SilenceUsage: true, SilenceErrors: true, |