Skip to content

Commit

Permalink
fix sample code in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
koron committed Mar 14, 2024
1 parent 35f68c7 commit 06ffad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ The basic usage consists of just 3 steps.
```go
package item
var CommandSet = subcmd.DefineSet("item", List, Add)
var CommandSet = subcmd.DefineSet("item", "operate items", List, Add)
```

Similarly, assume that multiple commands (List/Add/Delete) have been defined for `user` package.

```go
package user
var CommandSet = subcmd.DefineSet("user", List, Add, Delete)
var CommandSet = subcmd.DefineSet("user", "operate users", List, Add, Delete)
```

3. Call function `subcmd.Run()` with the defined set from `main()`.
Expand Down

0 comments on commit 06ffad1

Please sign in to comment.