From 92fda3924c84e32156617322c1155f23c6fd32a8 Mon Sep 17 00:00:00 2001 From: umarcor Date: Thu, 4 Nov 2021 05:00:12 +0100 Subject: [PATCH] fork spf13/cobra to umarcor/cobra --- README.md | 16 ++++++++-------- doc/cmd_test.go | 2 +- doc/man_docs.go | 8 ++++---- doc/man_docs_test.go | 2 +- doc/man_examples_test.go | 4 ++-- doc/md_docs.go | 2 +- doc/md_docs_test.go | 2 +- doc/rest_docs.go | 2 +- doc/rest_docs_test.go | 2 +- doc/util.go | 2 +- doc/yaml_docs.go | 2 +- doc/yaml_docs_test.go | 2 +- go.mod | 2 +- site/content/docgen/man.md | 4 ++-- site/content/docgen/md.md | 6 +++--- site/content/docgen/rest.md | 6 +++--- site/content/docgen/yaml.md | 6 +++--- site/content/user_guide.md | 12 ++++++------ 18 files changed, 41 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 6444f4b7f..43aceff75 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Cobra is used in many Go projects such as [Kubernetes](https://kubernetes.io/), [Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to name a few. [This list](site/content/projects_using_cobra.md) contains a more extensive list of projects using Cobra. -[![](https://img.shields.io/github/actions/workflow/status/spf13/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest) -[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra) -[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra) +[!['Test' workflow status](https://img.shields.io/github/actions/workflow/status/umarcor/cobra/test.yml?branch=main&longCache=true&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/umarcor/cobra/actions?query=workflow%3ATest) +[![Go Reference](https://pkg.go.dev/badge/github.com/umarcor/cobra.svg)](https://pkg.go.dev/github.com/umarcor/cobra) +[![Go Report Card](https://goreportcard.com/badge/github.com/umarcor/cobra)](https://goreportcard.com/report/github.com/umarcor/cobra) [![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199) # Overview @@ -63,7 +63,7 @@ have children commands and optionally run an action. In the example above, 'server' is the command. -[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command) +[More about cobra.Command](https://pkg.go.dev/github.com/umarcor/cobra#Command) ## Flags @@ -83,13 +83,13 @@ Using Cobra is easy. First, use `go get` to install the latest version of the library. ``` -go get -u github.com/spf13/cobra@latest +go get -u github.com/umarcor/cobra@latest ``` Next, include Cobra in your application: ```go -import "github.com/spf13/cobra" +import "github.com/umarcor/cobra" ``` # Usage @@ -100,10 +100,10 @@ develop a Cobra-based application. It is the easiest way to incorporate Cobra in It can be installed by running: ``` -go install github.com/spf13/cobra-cli@latest +go install github.com/umarcor/cobra-cli@latest ``` -For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md) +For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md). For complete details on using the Cobra library, please read the [The Cobra User Guide](site/content/user_guide.md). diff --git a/doc/cmd_test.go b/doc/cmd_test.go index 0d022c77d..08eb6244e 100644 --- a/doc/cmd_test.go +++ b/doc/cmd_test.go @@ -18,7 +18,7 @@ import ( "strings" "testing" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func emptyRun(*cobra.Command, []string) {} diff --git a/doc/man_docs.go b/doc/man_docs.go index b8c15ce88..f63a89034 100644 --- a/doc/man_docs.go +++ b/doc/man_docs.go @@ -26,8 +26,8 @@ import ( "time" "github.com/cpuguy83/go-md2man/v2/md2man" - "github.com/spf13/cobra" "github.com/spf13/pflag" + "github.com/umarcor/cobra" ) // GenManTree will generate a man page for this command and all descendants @@ -89,7 +89,7 @@ type GenManTreeOptions struct { // GenManHeader is a lot like the .TH header at the start of man pages. These // include the title, section, date, source, and manual. We will use the -// current time if Date is unset and will use "Auto generated by spf13/cobra" +// current time if Date is unset and will use "Auto generated by umarcor/cobra" // if the Source is unset. type GenManHeader struct { Title string @@ -135,7 +135,7 @@ func fillHeader(header *GenManHeader, name string, disableAutoGen bool) error { } header.date = (*header.Date).Format("Jan 2006") if header.Source == "" && !disableAutoGen { - header.Source = "Auto generated by spf13/cobra" + header.Source = "Auto generated by umarcor/cobra" } return nil } @@ -240,7 +240,7 @@ func genMan(cmd *cobra.Command, header *GenManHeader) []byte { buf.WriteString(strings.Join(seealsos, ", ") + "\n") } if !cmd.DisableAutoGenTag { - buf.WriteString(fmt.Sprintf("# HISTORY\n%s Auto generated by spf13/cobra\n", header.Date.Format("2-Jan-2006"))) + buf.WriteString(fmt.Sprintf("# HISTORY\n%s Auto generated by umarcor/cobra\n", header.Date.Format("2-Jan-2006"))) } return buf.Bytes() } diff --git a/doc/man_docs_test.go b/doc/man_docs_test.go index c111d455f..2026cf916 100644 --- a/doc/man_docs_test.go +++ b/doc/man_docs_test.go @@ -24,7 +24,7 @@ import ( "strings" "testing" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func assertNoErr(t *testing.T, e error) { diff --git a/doc/man_examples_test.go b/doc/man_examples_test.go index 873b2b6d6..6e2233c60 100644 --- a/doc/man_examples_test.go +++ b/doc/man_examples_test.go @@ -18,8 +18,8 @@ import ( "bytes" "fmt" - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra" + "github.com/umarcor/cobra/doc" ) func ExampleGenManTree() { diff --git a/doc/md_docs.go b/doc/md_docs.go index c4a27c009..3127c831c 100644 --- a/doc/md_docs.go +++ b/doc/md_docs.go @@ -24,7 +24,7 @@ import ( "strings" "time" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) error { diff --git a/doc/md_docs_test.go b/doc/md_docs_test.go index e70cad822..6c49ada9d 100644 --- a/doc/md_docs_test.go +++ b/doc/md_docs_test.go @@ -21,7 +21,7 @@ import ( "path/filepath" "testing" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func TestGenMdDoc(t *testing.T) { diff --git a/doc/rest_docs.go b/doc/rest_docs.go index 2cca6fd77..4d1fe2835 100644 --- a/doc/rest_docs.go +++ b/doc/rest_docs.go @@ -24,7 +24,7 @@ import ( "strings" "time" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func printOptionsReST(buf *bytes.Buffer, cmd *cobra.Command, name string) error { diff --git a/doc/rest_docs_test.go b/doc/rest_docs_test.go index 1a3ea9dd5..e40b5829e 100644 --- a/doc/rest_docs_test.go +++ b/doc/rest_docs_test.go @@ -21,7 +21,7 @@ import ( "path/filepath" "testing" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func TestGenRSTDoc(t *testing.T) { diff --git a/doc/util.go b/doc/util.go index 0aaa07a16..ab3aaaf67 100644 --- a/doc/util.go +++ b/doc/util.go @@ -17,7 +17,7 @@ package doc import ( "strings" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) // Test to see if we have a reason to print See Also information in docs diff --git a/doc/yaml_docs.go b/doc/yaml_docs.go index 2b26d6ec0..e319848c7 100644 --- a/doc/yaml_docs.go +++ b/doc/yaml_docs.go @@ -22,8 +22,8 @@ import ( "sort" "strings" - "github.com/spf13/cobra" "github.com/spf13/pflag" + "github.com/umarcor/cobra" "gopkg.in/yaml.v3" ) diff --git a/doc/yaml_docs_test.go b/doc/yaml_docs_test.go index 1a6fa7c31..fc86ac8d6 100644 --- a/doc/yaml_docs_test.go +++ b/doc/yaml_docs_test.go @@ -22,7 +22,7 @@ import ( "path/filepath" "testing" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func TestGenYamlDoc(t *testing.T) { diff --git a/go.mod b/go.mod index 6361d7424..5ab2367ba 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/spf13/cobra +module github.com/umarcor/cobra go 1.15 diff --git a/site/content/docgen/man.md b/site/content/docgen/man.md index 3709160f3..b9f233162 100644 --- a/site/content/docgen/man.md +++ b/site/content/docgen/man.md @@ -8,8 +8,8 @@ package main import ( "log" - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra" + "github.com/umarcor/cobra/doc" ) func main() { diff --git a/site/content/docgen/md.md b/site/content/docgen/md.md index 1659175cf..57920b5e0 100644 --- a/site/content/docgen/md.md +++ b/site/content/docgen/md.md @@ -8,8 +8,8 @@ package main import ( "log" - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra" + "github.com/umarcor/cobra/doc" ) func main() { @@ -41,7 +41,7 @@ import ( "k8s.io/kubernetes/pkg/kubectl/cmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra/doc" ) func main() { diff --git a/site/content/docgen/rest.md b/site/content/docgen/rest.md index 3041c573a..ca5662fa7 100644 --- a/site/content/docgen/rest.md +++ b/site/content/docgen/rest.md @@ -8,8 +8,8 @@ package main import ( "log" - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra" + "github.com/umarcor/cobra/doc" ) func main() { @@ -41,7 +41,7 @@ import ( "k8s.io/kubernetes/pkg/kubectl/cmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra/doc" ) func main() { diff --git a/site/content/docgen/yaml.md b/site/content/docgen/yaml.md index 172e61d12..9040d0599 100644 --- a/site/content/docgen/yaml.md +++ b/site/content/docgen/yaml.md @@ -8,8 +8,8 @@ package main import ( "log" - "github.com/spf13/cobra" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra" + "github.com/umarcor/cobra/doc" ) func main() { @@ -41,7 +41,7 @@ import ( "k8s.io/kubernetes/pkg/kubectl/cmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" - "github.com/spf13/cobra/doc" + "github.com/umarcor/cobra/doc" ) func main() { diff --git a/site/content/user_guide.md b/site/content/user_guide.md index 56e8e44a3..5d0327624 100644 --- a/site/content/user_guide.md +++ b/site/content/user_guide.md @@ -32,7 +32,7 @@ func main() { Cobra-CLI is its own program that will create your application and add any commands you want. It's the easiest way to incorporate Cobra into your application. -For complete details on using the Cobra generator, please refer to [The Cobra-CLI Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md) +For complete details on using the Cobra generator, please refer to [The Cobra-CLI Generator README](https://github.com/spf13/cobra-cli/blob/main/README.md). ## Using the Cobra Library @@ -76,7 +76,7 @@ import ( "fmt" "os" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" "github.com/spf13/viper" ) @@ -171,7 +171,7 @@ package cmd import ( "fmt" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func init() { @@ -229,7 +229,7 @@ package cmd import ( "fmt" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func init() { @@ -437,7 +437,7 @@ import ( "fmt" "strings" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func main() { @@ -614,7 +614,7 @@ package main import ( "fmt" - "github.com/spf13/cobra" + "github.com/umarcor/cobra" ) func main() {