Skip to content

Commit

Permalink
chore(readme): update usage example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ergoz committed Jun 10, 2022
1 parent c6d1281 commit 387638e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,21 @@ func main() {
}
```

## Install binary
## Use binary command

You can install binary with `namegen` name to get names in command line

Example:

```
namegen -retries=1
```

or just call `namegen` binary to get new name.

if `retries` flag is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g 'focused_turing3'


### if golang installed

```
Expand Down
2 changes: 1 addition & 1 deletion cmd/namegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func main() {
var retriesCount int

flag.IntVar(&retriesCount, "retries", 0, "If retry is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g 'focused_turing3'")
flag.IntVar(&retriesCount, "retries", 0, "if is non-zero, a random integer between 0 and 10 will be added to the end of the name, e.g 'focused_turing3'")
flag.Parse()

rand.Seed(time.Now().UnixNano())
Expand Down

0 comments on commit 387638e

Please sign in to comment.