From 1223d49a6213c4e600641a615c4be00b85b5b413 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 16 Dec 2021 14:39:36 -0500 Subject: [PATCH] Fixes issue references --- cobra/cmd/add.go | 2 +- command.go | 2 +- command_test.go | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cobra/cmd/add.go b/cobra/cmd/add.go index c2d82ade..f4e62148 100644 --- a/cobra/cmd/add.go +++ b/cobra/cmd/add.go @@ -71,7 +71,7 @@ Example: cobra add server -> resulting in a new cmd/server.go`, // validateCmdName returns source without any dashes and underscore. // If there will be dash or underscore, next letter will be uppered. // It supports only ASCII (1-byte character) strings. -// https://github.com/OneCloudInc/cobra/issues/269 +// https://github.com/spf13/cobra/issues/269 func validateCmdName(source string) string { i := 0 l := len(source) diff --git a/command.go b/command.go index c678063e..7d5ba929 100644 --- a/command.go +++ b/command.go @@ -1229,7 +1229,7 @@ func (c *Command) IsAvailableCommand() bool { // help topic command; additional help topic command is determined by the // fact that it is NOT runnable/hidden/deprecated, and has no sub commands that // are runnable/hidden/deprecated. -// Concrete example: https://github.com/OneCloudInc/cobra/issues/393#issuecomment-282741924. +// Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924. func (c *Command) IsAdditionalHelpTopicCommand() bool { // if a command is runnable, deprecated, or hidden it is not a 'help' command if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden { diff --git a/command_test.go b/command_test.go index c7c581fe..52169e74 100644 --- a/command_test.go +++ b/command_test.go @@ -805,7 +805,7 @@ func TestHelpFlagExecutedOnChild(t *testing.T) { // TestHelpFlagInHelp checks, // if '--help' flag is shown in help for child (executing `parent help child`), // that has no other flags. -// Related to https://github.com/OneCloudInc/cobra/issues/302. +// Related to https://github.com/spf13/cobra/issues/302. func TestHelpFlagInHelp(t *testing.T) { parentCmd := &Command{Use: "parent", Run: func(*Command, []string) {}} @@ -1205,7 +1205,7 @@ func TestPersistentHooks(t *testing.T) { } } -// Related to https://github.com/OneCloudInc/cobra/issues/521. +// Related to https://github.com/spf13/cobra/issues/521. func TestGlobalNormFuncPropagation(t *testing.T) { normFunc := func(f *pflag.FlagSet, name string) pflag.NormalizedName { return pflag.NormalizedName(name) @@ -1225,7 +1225,7 @@ func TestGlobalNormFuncPropagation(t *testing.T) { } } -// Related to https://github.com/OneCloudInc/cobra/issues/521. +// Related to https://github.com/spf13/cobra/issues/521. func TestNormPassedOnLocal(t *testing.T) { toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName { return pflag.NormalizedName(strings.ToUpper(name)) @@ -1239,7 +1239,7 @@ func TestNormPassedOnLocal(t *testing.T) { } } -// Related to https://github.com/OneCloudInc/cobra/issues/521. +// Related to https://github.com/spf13/cobra/issues/521. func TestNormPassedOnInherited(t *testing.T) { toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName { return pflag.NormalizedName(strings.ToUpper(name)) @@ -1267,7 +1267,7 @@ func TestNormPassedOnInherited(t *testing.T) { } } -// Related to https://github.com/OneCloudInc/cobra/issues/521. +// Related to https://github.com/spf13/cobra/issues/521. func TestConsistentNormalizedName(t *testing.T) { toUpper := func(f *pflag.FlagSet, name string) pflag.NormalizedName { return pflag.NormalizedName(strings.ToUpper(name)) @@ -1400,7 +1400,7 @@ func TestFlagErrorFunc(t *testing.T) { // TestSortedFlags checks, // if cmd.LocalFlags() is unsorted when cmd.Flags().SortFlags set to false. -// Related to https://github.com/OneCloudInc/cobra/issues/404. +// Related to https://github.com/spf13/cobra/issues/404. func TestSortedFlags(t *testing.T) { c := &Command{} c.Flags().SortFlags = false @@ -1426,7 +1426,7 @@ func TestSortedFlags(t *testing.T) { // TestMergeCommandLineToFlags checks, // if pflag.CommandLine is correctly merged to c.Flags() after first call // of c.mergePersistentFlags. -// Related to https://github.com/OneCloudInc/cobra/issues/443. +// Related to https://github.com/spf13/cobra/issues/443. func TestMergeCommandLineToFlags(t *testing.T) { pflag.Bool("boolflag", false, "") c := &Command{Use: "c", Run: emptyRun} @@ -1440,7 +1440,7 @@ func TestMergeCommandLineToFlags(t *testing.T) { // TestUseDeprecatedFlags checks, // if cobra.Execute() prints a message, if a deprecated flag is used. -// Related to https://github.com/OneCloudInc/cobra/issues/463. +// Related to https://github.com/spf13/cobra/issues/463. func TestUseDeprecatedFlags(t *testing.T) { c := &Command{Use: "c", Run: emptyRun} c.Flags().BoolP("deprecated", "d", false, "deprecated flag")