Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Khouzam <[email protected]>
  • Loading branch information
marevers and marckhouzam authored Jul 16, 2023
1 parent dd99cf1 commit 7aa1511
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/content/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ rootCmd.Flags().BoolVar(&ofYaml, "yaml", false, "Output in YAML")
rootCmd.MarkFlagsMutuallyExclusive("json", "yaml")
```

If you want to require least one flag from a group to be present, you can use `MarkFlagsOneRequired`.
If you want to require at least one flag from a group to be present, you can use `MarkFlagsOneRequired`.
This can be combined with `MarkFlagsMutuallyExclusive` to enforce exactly one flag from a given group:
```go
rootCmd.Flags().BoolVar(&ofJson, "json", false, "Output in JSON")
Expand Down

0 comments on commit 7aa1511

Please sign in to comment.