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 Jul 4, 2020
1 parent 46fe8b4 commit b12cd46
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 45 deletions.
23 changes: 11 additions & 12 deletions README.md
Expand Up @@ -6,9 +6,8 @@ Cobra is used in many Go projects such as [Kubernetes](http://kubernetes.io/),
[Hugo](https://gohugo.io), and [Github CLI](https://github.com/cli/cli) to
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.

[![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra)
[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra)
[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra)
[![GoDoc](https://godoc.org/github.com/umarcor/cobra?status.svg)](https://godoc.org/github.com/umarcor/cobra)
[![Go Report Card](https://goreportcard.com/badge/github.com/umarcor/cobra)](https://goreportcard.com/report/github.com/umarcor/cobra)

# Table of Contents

Expand Down Expand Up @@ -87,7 +86,7 @@ have children commands and optionally run an action.

In the example above, 'server' is the command.

[More about cobra.Command](https://godoc.org/github.com/spf13/cobra#Command)
[More about cobra.Command](https://godoc.org/github.com/umarcor/cobra#Command)

## Flags

Expand All @@ -107,12 +106,12 @@ Using Cobra is easy. First, use `go get` to install the latest version
of the library. This command will install the `cobra` generator executable
along with the library and its dependencies:

go get -u github.com/spf13/cobra/cobra
go get -u github.com/umarcor/cobra/cobra

Next, include Cobra in your application:

```go
import "github.com/spf13/cobra"
import "github.com/umarcor/cobra"
```

# Getting Started
Expand Down Expand Up @@ -149,7 +148,7 @@ func main() {
Cobra provides 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.

[Here](https://github.com/spf13/cobra/blob/master/cobra/README.md) you can find more information about it.
[Here](https://github.com/umarcor/cobra/blob/master/cobra/README.md) you can find more information about it.

## Using the Cobra Library

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

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

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

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

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

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

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

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

func main() {
Expand Down Expand Up @@ -738,4 +737,4 @@ Cobra can generate a shell-completion file for the following shells: Bash, Zsh,

# License

Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/spf13/cobra/blob/master/LICENSE.txt)
Cobra is released under the Apache 2.0 license. See [LICENSE.txt](https://github.com/umarcor/cobra/blob/master/LICENSE.txt)
4 changes: 2 additions & 2 deletions cobra/add.go
Expand Up @@ -18,7 +18,7 @@ import (
"os"
"unicode"

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

var (
Expand Down Expand Up @@ -78,7 +78,7 @@ func init() {
// 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/spf13/cobra/issues/269
// https://github.com/umarcor/cobra/issues/269
func validateCmdName(source string) string {
i := 0
l := len(source)
Expand Down
2 changes: 1 addition & 1 deletion cobra/init.go
Expand Up @@ -18,8 +18,8 @@ import (
"os"
"path"

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

var (
Expand Down
2 changes: 1 addition & 1 deletion cobra/main.go
Expand Up @@ -17,8 +17,8 @@ import (
"fmt"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cobra/project.go
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"text/template"

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

// Project contains name, license and paths to projects.
Expand Down
2 changes: 1 addition & 1 deletion doc/cmd_test.go
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

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

func emptyRun(*cobra.Command, []string) {}
Expand Down
10 changes: 5 additions & 5 deletions doc/man_docs.go
Expand Up @@ -24,9 +24,9 @@ import (
"strings"
"time"

"github.com/cpuguy83/go-md2man/v2/md2man"
"github.com/spf13/cobra"
"github.com/cpuguy83/go-md2man/md2man"
"github.com/spf13/pflag"
"github.com/umarcor/cobra"
)

// GenManTree will generate a man page for this command and all descendants
Expand Down Expand Up @@ -88,7 +88,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 @@ -134,7 +134,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 @@ -241,7 +241,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()
}
4 changes: 2 additions & 2 deletions doc/man_docs.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
2 changes: 1 addition & 1 deletion doc/man_docs_test.go
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

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

func translate(in string) string {
Expand Down
4 changes: 2 additions & 2 deletions doc/man_examples_test.go
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"fmt"

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

func er(msg interface{}) {
Expand Down
2 changes: 1 addition & 1 deletion doc/md_docs.go
Expand Up @@ -23,7 +23,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
6 changes: 3 additions & 3 deletions doc/md_docs.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
2 changes: 1 addition & 1 deletion doc/md_docs_test.go
Expand Up @@ -7,7 +7,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 @@ -23,7 +23,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
6 changes: 3 additions & 3 deletions doc/rest_docs.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
2 changes: 1 addition & 1 deletion doc/rest_docs_test.go
Expand Up @@ -7,7 +7,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 @@ import (
"io"
"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 @@ -21,8 +21,8 @@ import (
"sort"
"strings"

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

Expand Down
6 changes: 3 additions & 3 deletions doc/yaml_docs.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
2 changes: 1 addition & 1 deletion doc/yaml_docs_test.go
Expand Up @@ -7,7 +7,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.12

Expand Down

0 comments on commit b12cd46

Please sign in to comment.