get latest changes from master

This commit is contained in:
mingrammer 2019-03-07 00:04:18 +09:00 committed by Ajitem Sahasrabuddhe
parent e01e3c540c
commit 9766be8d3e
No known key found for this signature in database
GPG Key ID: 5B0EE10DAA76876C
17 changed files with 57 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.coverprofile
node_modules/
vendor

View File

@ -874,7 +874,7 @@ Will include:
```
COMMANDS:
noop
noop
Template actions:
add

View File

@ -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

View File

@ -3,7 +3,7 @@ package altsrc
import (
"flag"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
// WARNING: This file is generated!

View File

@ -8,7 +8,7 @@ import (
"testing"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
type testApplyInputSource struct {

View File

@ -3,7 +3,7 @@ package altsrc
import (
"time"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
// InputSourceContext is an interface used to allow

View File

@ -6,7 +6,7 @@ import (
"os"
"testing"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
const (

View File

@ -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

View File

@ -6,7 +6,7 @@ import (
"strings"
"time"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
// MapInputSource implements InputSourceContext to return

View File

@ -11,7 +11,7 @@ import (
"os"
"testing"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
func TestCommandTomFileTest(t *testing.T) {

View File

@ -10,7 +10,7 @@ import (
"reflect"
"github.com/BurntSushi/toml"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
type tomlMap struct {

View File

@ -11,7 +11,7 @@ import (
"os"
"testing"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
)
func TestCommandYamlFileTest(t *testing.T) {

View File

@ -14,7 +14,7 @@ import (
"runtime"
"strings"
"gopkg.in/urfave/cli.v1"
"github.com/urfave/cli"
"gopkg.in/yaml.v2"
)

28
flaggen/main.go Normal file
View File

@ -0,0 +1,28 @@
package main
import (
"github.com/urfave/cli"
"log"
"os"
)
func main() {
app := cli.NewApp()
app.Name = "flaggen"
app.Usage = "Generate flag type code!"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "package, p",
Value: "cli",
Usage: "`Name of the package` for which the flag types will be generated",
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}

8
go.mod Normal file
View File

@ -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
go.sum Normal file
View File

@ -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=

View File

@ -240,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)