Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Lynn Cyrin (they/them) committed Aug 3, 2019
2 parents c75a689 + 244eba7 commit b1a7c50
Show file tree
Hide file tree
Showing 17 changed files with 42 additions and 24 deletions.
3 changes: 3 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
- @meatballhat
- @lynncyrin
- @AudriusButkevicius
- @asahasrabuddhe
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ Will include:

```
COMMANDS:
noop
noop
Template actions:
add
Expand Down
2 changes: 1 addition & 1 deletion altsrc/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"syscall"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

// FlagInputSourceExtension is an extension interface of cli.Flag that
Expand Down
2 changes: 1 addition & 1 deletion altsrc/flag_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package altsrc
import (
"flag"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

// WARNING: This file is generated!
Expand Down
2 changes: 1 addition & 1 deletion altsrc/flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

type testApplyInputSource struct {
Expand Down
2 changes: 1 addition & 1 deletion altsrc/input_source_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package altsrc
import (
"time"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

// InputSourceContext is an interface used to allow
Expand Down
2 changes: 1 addition & 1 deletion altsrc/json_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion altsrc/json_source_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

// NewJSONSourceFromFlagFunc returns a func that takes a cli.Context
Expand Down
2 changes: 1 addition & 1 deletion altsrc/map_input_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

// MapInputSource implements InputSourceContext to return
Expand Down
2 changes: 1 addition & 1 deletion altsrc/toml_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"testing"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

func TestCommandTomFileTest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion altsrc/toml_file_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"

"github.com/BurntSushi/toml"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

type tomlMap struct {
Expand Down
2 changes: 1 addition & 1 deletion altsrc/yaml_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"testing"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)

func TestCommandYamlFileTest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion altsrc/yaml_file_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"runtime"
"strings"

"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"

"gopkg.in/yaml.v2"
)
Expand Down
6 changes: 3 additions & 3 deletions app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ func ExampleApp_Run_appHelp() {
// Oliver Allen <oliver@toyshop.com>
//
// COMMANDS:
// describeit, d use it to see a description
// help, h Shows a list of commands or help for one command
// describeit, d use it to see a description
// help, h Shows a list of commands or help for one command
//
// GLOBAL OPTIONS:
// --name value a name to say (default: "bob")
Expand Down Expand Up @@ -190,7 +190,7 @@ func ExampleApp_Run_noAction() {
// [global options] command [command options] [arguments...]
//
// COMMANDS:
// help, h Shows a list of commands or help for one command
// help, h Shows a list of commands or help for one command
//
// GLOBAL OPTIONS:
// --help, -h show help
Expand Down
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/urfave/cli

go 1.12

require (
github.com/BurntSushi/toml v0.3.1
gopkg.in/yaml.v2 v2.2.2
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
19 changes: 10 additions & 9 deletions help.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{.Name}}:{{end}}{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
{{.Name}}:{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
GLOBAL OPTIONS:
{{range $index, $option := .VisibleFlags}}{{if $index}}
Expand Down Expand Up @@ -71,9 +72,11 @@ USAGE:
{{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{.Name}}:{{end}}{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
{{end}}{{if .VisibleFlags}}
{{.Name}}:{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
OPTIONS:
{{range .VisibleFlags}}{{.}}
{{end}}{{end}}
Expand Down Expand Up @@ -237,10 +240,8 @@ func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc m
funcMap := template.FuncMap{
"join": strings.Join,
}
if customFunc != nil {
for key, value := range customFunc {
funcMap[key] = value
}
for key, value := range customFunc {
funcMap[key] = value
}

w := tabwriter.NewWriter(out, 1, 8, 2, ' ', 0)
Expand Down

0 comments on commit b1a7c50

Please sign in to comment.