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 Oct 2, 2019
1 parent 1c8e1a7 commit 2038338
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 48 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ Many of the most widely used Go projects are built using Cobra, such as:
[Linkerd](https://linkerd.io/),
etc.

[![Build Status](https://travis-ci.org/spf13/cobra.svg "Travis CI status")](https://travis-ci.org/spf13/cobra)
[![CircleCI status](https://circleci.com/gh/spf13/cobra.png?circle-token=:circle-token "CircleCI status")](https://circleci.com/gh/spf13/cobra)
[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra)
[![GoDoc](https://godoc.org/github.com/umarcor/cobra?status.svg)](https://godoc.org/github.com/umarcor/cobra)

# Table of Contents

Expand Down Expand Up @@ -109,7 +107,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 @@ -129,12 +127,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 @@ -171,7 +169,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 @@ -214,7 +212,7 @@ import (
"os"

homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/umarcor/cobra"
"github.com/spf13/viper"
)

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

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

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

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

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

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

func main() {
Expand Down Expand Up @@ -746,4 +744,4 @@ Cobra can generate zsh-completion file. Read more about it in

# 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/cmd/add.go
Original file line number Diff line number Diff line change
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/cmd/init.go
Original file line number Diff line number Diff line change
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/cmd/project.go
Original file line number Diff line number Diff line change
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 cobra/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"fmt"

homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/umarcor/cobra"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions cobra/cmd/testdata/root.go.golden
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/umarcor/cobra"

homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/viper"

)


Expand Down
2 changes: 1 addition & 1 deletion cobra/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package main
import (
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cobra/tpl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
"github.com/umarcor/cobra"
{{ if .Viper }}
homedir "github.com/mitchellh/go-homedir"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion doc/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"time"

"github.com/cpuguy83/go-md2man/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 @@ -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) error {
}
header.date = (*header.Date).Format("Jan 2006")
if header.Source == "" {
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 ExampleGenManTree() {
Expand Down
2 changes: 1 addition & 1 deletion doc/md_docs.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/spf13/cobra
module github.com/umarcor/cobra

go 1.12

Expand Down

0 comments on commit 2038338

Please sign in to comment.