Skip to content

Commit

Permalink
fork spf13/cobra to umarcor/cobra
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Aug 29, 2023
1 parent b0968bd commit d6811c2
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 41 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -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)
[![](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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion doc/cmd_test.go
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"testing"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func emptyRun(*cobra.Command, []string) {}
Expand Down
8 changes: 4 additions & 4 deletions doc/man_docs.go
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion doc/man_docs_test.go
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"testing"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func assertNoErr(t *testing.T, e error) {
Expand Down
4 changes: 2 additions & 2 deletions doc/man_examples_test.go
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion doc/md_docs.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion doc/md_docs_test.go
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"testing"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func TestGenMdDoc(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion doc/rest_docs.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion doc/rest_docs_test.go
Expand Up @@ -21,7 +21,7 @@ import (
"path/filepath"
"testing"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func TestGenRSTDoc(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion doc/util.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/yaml_docs.go
Expand Up @@ -22,8 +22,8 @@ import (
"sort"
"strings"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/umarcor/cobra"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion doc/yaml_docs_test.go
Expand Up @@ -22,7 +22,7 @@ import (
"path/filepath"
"testing"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func TestGenYamlDoc(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,4 +1,4 @@
module github.com/spf13/cobra
module github.com/umarcor/cobra

go 1.15

Expand Down
4 changes: 2 additions & 2 deletions site/content/docgen/man.md
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions site/content/docgen/md.md
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions site/content/docgen/rest.md
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions site/content/docgen/yaml.md
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
12 changes: 6 additions & 6 deletions site/content/user_guide.md
Expand Up @@ -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

Expand Down Expand Up @@ -76,7 +76,7 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
"github.com/spf13/viper"
)

Expand Down Expand Up @@ -171,7 +171,7 @@ package cmd
import (
"fmt"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func init() {
Expand Down Expand Up @@ -229,7 +229,7 @@ package cmd
import (
"fmt"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func init() {
Expand Down Expand Up @@ -437,7 +437,7 @@ import (
"fmt"
"strings"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func main() {
Expand Down Expand Up @@ -614,7 +614,7 @@ package main
import (
"fmt"

"github.com/spf13/cobra"
"github.com/umarcor/cobra"
)

func main() {
Expand Down

0 comments on commit d6811c2

Please sign in to comment.