add more help text
This commit is contained in:
11
cmd/gcd.go
11
cmd/gcd.go
@@ -69,9 +69,12 @@ func gcd(cmd *cobra.Command, args []string) {
|
||||
var gcdCmd = &cobra.Command{
|
||||
Use: "gcd N N [N ...]",
|
||||
Short: "Compute the greatest common denominator of a set of numbers",
|
||||
Long: `Compute the greatest common denominator of a set of numbers.`,
|
||||
Args: cobra.MinimumNArgs(2),
|
||||
Run: gcd,
|
||||
Long: `Compute the greatest common denominator of a set of numbers.
|
||||
|
||||
Provide the --extended flag to also compute the Bézout coefficients, i.e. coefficients a,b,c,... such that
|
||||
ax + by + cz + ... = gcd(x,y,z,...)`,
|
||||
Args: cobra.MinimumNArgs(2),
|
||||
Run: gcd,
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -87,5 +90,5 @@ func init() {
|
||||
// is called directly, e.g.:
|
||||
// gcdCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
|
||||
|
||||
gcdCmd.Flags().BoolVarP(&extended, "extended", "e", false, "also compute the Bezout coefficients")
|
||||
gcdCmd.Flags().BoolVarP(&extended, "extended", "e", false, "also compute the Bézout coefficients")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user