Merge remote-tracking branch 'origin/master' into pass-through-regression
This commit is contained in:
commit
e042de5cb4
@ -60,7 +60,7 @@ organized, and expressive!
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Make sure you have a working Go environment. Go version 1.2+ is supported. [See
|
Make sure you have a working Go environment. Go version 1.10+ is supported. [See
|
||||||
the install instructions for Go](http://golang.org/doc/install.html).
|
the install instructions for Go](http://golang.org/doc/install.html).
|
||||||
|
|
||||||
To install cli, simply run:
|
To install cli, simply run:
|
||||||
|
64
build.go
64
build.go
@ -52,8 +52,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func VetActionFunc(_ *cli.Context) error {
|
func runCmd(arg string, args ...string) error {
|
||||||
cmd := exec.Command("go", "vet")
|
cmd := exec.Command(arg, args...)
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
cmd.Stdin = os.Stdin
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
@ -62,6 +62,10 @@ func VetActionFunc(_ *cli.Context) error {
|
|||||||
return cmd.Run()
|
return cmd.Run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func VetActionFunc(_ *cli.Context) error {
|
||||||
|
return runCmd("go", "vet")
|
||||||
|
}
|
||||||
|
|
||||||
func TestActionFunc(c *cli.Context) error {
|
func TestActionFunc(c *cli.Context) error {
|
||||||
for _, pkg := range packages {
|
for _, pkg := range packages {
|
||||||
var packageName string
|
var packageName string
|
||||||
@ -74,13 +78,7 @@ func TestActionFunc(c *cli.Context) error {
|
|||||||
|
|
||||||
coverProfile := fmt.Sprintf("--coverprofile=%s.coverprofile", pkg)
|
coverProfile := fmt.Sprintf("--coverprofile=%s.coverprofile", pkg)
|
||||||
|
|
||||||
cmd := exec.Command("go", "test", "-v", coverProfile, packageName)
|
err := runCmd("go", "test", "-v", coverProfile, packageName)
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -152,34 +150,16 @@ func GfmrunActionFunc(_ *cli.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("gfmrun", "-c", fmt.Sprint(counter), "-s", "README.md")
|
return runCmd("gfmrun", "-c", fmt.Sprint(counter), "-s", "README.md")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
return cmd.Run()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TocActionFunc(_ *cli.Context) error {
|
func TocActionFunc(_ *cli.Context) error {
|
||||||
cmd := exec.Command("node_modules/.bin/markdown-toc", "-i", "README.md")
|
err := runCmd("node_modules/.bin/markdown-toc", "-i", "README.md")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = exec.Command("git", "diff", "--exit-code")
|
err = runCmd("git", "diff", "--exit-code")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err = cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -188,35 +168,17 @@ func TocActionFunc(_ *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GenActionFunc(_ *cli.Context) error {
|
func GenActionFunc(_ *cli.Context) error {
|
||||||
cmd := exec.Command("go", "generate", "flag-gen/main.go")
|
err := runCmd("go", "generate", "flag-gen/main.go")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = exec.Command("go", "generate", "cli.go")
|
err = runCmd("go", "generate", "cli.go")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err = cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = exec.Command("git", "diff", "--exit-code")
|
err = runCmd("git", "diff", "--exit-code")
|
||||||
|
|
||||||
cmd.Stdin = os.Stdin
|
|
||||||
cmd.Stdout = os.Stdout
|
|
||||||
cmd.Stderr = os.Stderr
|
|
||||||
|
|
||||||
err = cmd.Run()
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,9 @@ var assets = func() http.FileSystem {
|
|||||||
"/source/flag-types.json": &vfsgen۰CompressedFileInfo{
|
"/source/flag-types.json": &vfsgen۰CompressedFileInfo{
|
||||||
name: "flag-types.json",
|
name: "flag-types.json",
|
||||||
modTime: time.Time{},
|
modTime: time.Time{},
|
||||||
uncompressedSize: 3364,
|
uncompressedSize: 3686,
|
||||||
|
|
||||||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x95\x41\x6f\x9b\x40\x10\x85\xef\xfc\x8a\xe9\x56\x95\xa0\xb2\x20\x87\x28\x07\x4b\xbd\x54\x55\x2b\xdf\x2a\xb9\xe9\x25\x44\xd1\x06\x16\xb2\xea\x7a\x16\x2d\x43\xd4\xc8\xf2\x7f\xaf\x16\x9b\x04\x16\x70\x48\x5b\x2c\x5f\x7c\x78\xe3\xe5\xed\xfb\x66\x47\x73\xe3\x01\x6c\x3d\x00\x00\x86\x7c\x23\xd8\x12\xd8\x67\xad\x15\x5b\xec\x35\x7a\x2a\x6a\xed\xbe\xa5\x3d\x72\x55\x59\x31\xe3\xaa\x14\x07\x2d\x15\x25\xb1\x25\x90\xa9\x1a\x25\xd1\x48\xe2\x37\xdd\xa5\x22\xe3\x95\xb2\x45\x56\x1f\x68\xbe\x52\x70\x53\x0a\x63\xe5\x92\x4c\xa2\xf1\x31\xfc\x6e\x15\x6b\xee\x67\xe1\x4f\xeb\x11\xae\xc9\x48\xcc\xfd\x20\xe8\x58\xef\x55\x7b\xd2\x08\xaa\x0c\x42\xcc\x62\xc6\x3c\x80\xdd\x62\x38\xcc\x8f\x7f\x4f\x93\xea\x84\xb8\x54\xf6\x30\xd0\x03\x27\x90\x65\x5d\x86\xfb\x27\x68\x12\x9e\x57\xf0\x2f\x95\xe1\x24\x35\xba\xd9\x49\x6e\x44\xe8\x16\x1b\x08\xed\xc4\x47\x19\xf8\xa5\x10\xf0\x40\x54\x94\xcb\x28\xca\xb5\xe2\x98\x87\xda\xe4\x51\xf1\x2b\x8f\xac\x43\xf4\xbe\x0e\xd5\xf8\x04\x47\xe0\x5c\xf4\xc1\xd4\x77\xec\x7c\xe0\xad\x64\xdc\xbf\x8f\x51\xfa\xaa\x34\xa7\xab\x4b\x17\x52\xd6\x95\x27\xe1\x99\x16\xad\xd3\xf3\xda\xbd\x17\x6d\x01\x57\x97\xaf\xc5\xdb\x50\xb8\x2e\x8c\x44\xca\xfc\x98\x7d\xc8\x62\xb6\x68\x22\x8f\x46\xfd\x26\x50\x18\x99\xb8\x51\x1d\x79\x3c\x6a\x7b\x40\x06\xb2\xa2\x54\x6e\x93\x1b\x0b\x89\x24\x4c\xc6\x13\xb1\xdd\x8d\xc4\x92\x59\x73\x7d\x78\xf7\x09\x50\x2a\xd8\xc6\x18\x53\x4c\x23\xed\xb4\xc5\x9d\xfd\x99\x30\x08\x2b\x1c\x68\xb0\xc4\x13\xb4\x77\x85\x43\xcd\xbd\x78\x7b\x7f\xd3\x29\xfd\x5d\x21\x0d\xa4\x3c\x87\x8c\xfb\xa3\x77\x09\xaf\xfd\xec\xad\xfc\x5a\x4a\xe7\xa1\xb0\x56\x32\x11\x2e\x8a\x8f\x6e\x61\x8e\x87\x7e\x73\xdb\x22\xfe\x02\xec\x19\x90\xff\x7c\x8b\x20\xd8\x4b\x16\x96\x30\x46\x1b\x1f\xa5\x1a\xc3\x31\xfb\x74\x8c\x12\x73\x4a\xb3\x31\x7b\x99\xc5\x31\x6a\x87\x9b\x9c\x0d\xb7\x83\x8b\xc3\xac\xec\xa8\x7f\x3b\x73\xb5\x6f\x8f\x47\x7f\xca\x5e\x05\xd0\xcd\x79\x3c\xca\xf0\x1b\x18\xa8\xcd\xf3\x08\xba\xe4\x06\x5f\x41\xeb\x2e\x67\xf3\x0c\xae\xe5\xd0\x76\xa9\x4e\xb2\x5e\xac\xf7\x09\xf7\xcb\xb5\xec\x2f\x98\xea\x04\x1b\x66\x52\x4c\x67\xc5\x54\xff\x6f\xc7\x78\xb7\xde\x9f\x00\x00\x00\xff\xff\x61\x79\x63\x47\x24\x0d\x00\x00"),
|
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x95\x41\x6f\x9b\x40\x10\x85\xef\xfc\x8a\xe9\x56\x95\xa0\xb2\x20\x07\xcb\x07\x4b\xbd\x54\x55\x2b\xdf\x2a\xb9\xe9\x25\x44\xd6\x06\x16\xb2\xca\x7a\x17\x2d\x43\xd4\xc8\xf2\x7f\xaf\x16\x8c\x0d\x6b\xb0\x4d\x23\x23\xf7\x92\xc3\x9b\x2c\x33\xef\xcb\x9b\xcc\x83\x03\xb0\x71\x00\x00\x88\xa4\x6b\x46\xe6\x40\xbe\x2a\x25\xc8\xa4\xd2\xf0\x2d\x2b\xb5\xa7\x86\xf6\x4a\x45\x61\xc4\x84\x8a\x9c\xed\xb4\x98\xe5\x48\xe6\x80\xba\xa8\x95\x48\x49\x64\x7f\x70\x15\xb3\x84\x16\xc2\x14\x49\xf9\xa0\xfe\x4a\x46\x75\xce\xb4\x91\x73\xd4\x91\x92\xaf\xfe\x4f\xa3\x98\xe6\x6e\xe2\xff\x36\x3d\xfc\x25\x6a\x2e\x53\xd7\xf3\x5a\xad\x2b\xd5\xbc\xd4\x0c\x0b\x2d\x21\x24\x21\xd9\x0f\x4c\x5f\x58\xbe\x4a\xb8\xd8\x4f\xe8\x00\x6c\x27\xdd\x2e\x7f\xbd\xdf\x66\xac\x22\xa4\x5c\x98\xc7\x80\xcf\x14\x81\xe7\x65\x19\x9e\xde\xa0\xb6\xfe\x9f\x10\xf9\x56\x68\x8a\x5c\x49\x1b\x0a\xf2\x35\xf3\xed\x62\x4d\xa7\x89\xe2\x24\x1c\x37\x67\x0c\x9e\x11\xb3\x7c\x1e\x04\xa9\x12\x54\xa6\xbe\xd2\x69\x90\xbd\xa4\x81\xe9\x10\x7c\x2c\xdd\xd6\x7d\xbc\x13\xd4\xee\x8e\x89\x95\x33\xb6\x3e\x30\x14\x99\xfd\xeb\x83\xf1\x7d\x17\x8a\xe2\x6c\x6a\xd3\x4b\xda\xf2\x45\xdc\x2e\xf3\xdc\x4a\x49\xd9\xfd\xc8\xf3\x04\x66\xd3\x73\xbe\xd7\xe8\x2f\x33\xcd\x25\x26\x6e\x48\x3e\x25\x21\x99\xd4\x2c\x86\x33\xf8\xc1\x24\xd3\x3c\xb2\x19\x58\x72\x3f\x83\xe6\xae\x75\x40\x90\x5c\xd8\xb1\xa8\x5b\x70\x89\x4c\x27\x34\x62\x9b\x6d\x8f\x5f\x9e\xd4\xbe\xe0\xc3\x17\x90\x5c\xc0\x26\x94\x21\x86\xd8\x13\x00\x53\xdc\x9a\x1f\xe7\x76\xca\xd8\xe8\xe1\xb1\x90\x1d\x89\xe0\x72\x84\x3c\x2c\x64\x57\x1a\xee\x86\x07\x22\x7e\x57\x20\x16\x12\x3b\xec\xdf\x82\xf9\xea\xe9\x2a\xa2\x65\x3f\x33\x95\x5b\x4a\xf1\xc8\x78\x96\x82\x47\xcc\x66\xf4\xd9\x2e\x5c\x63\x65\x1e\x1e\x1b\x7f\x8a\x03\xc9\x3d\x39\x77\x3f\x85\xe7\x55\x92\xa1\xc8\xb4\x56\xda\x95\x5c\xf4\x71\xba\xda\x9e\x9d\x01\x39\x9b\xf6\xa2\xb4\x4a\x57\x83\x79\x58\xeb\x3e\x9c\xbb\x49\x6e\x1f\xe8\xae\xbd\x05\x33\x6f\xa9\xff\xba\xbe\xcd\x81\x0e\xa0\x8e\x17\xf6\x2c\x99\x36\x80\xa1\xff\x9c\xab\xef\x74\x87\xa6\xa3\x76\x9d\xd4\xb4\x89\x76\xc6\xa6\x31\xcb\x6d\xe4\xe6\x04\xd3\x7b\xde\x75\xf1\x8a\x51\x4e\x9e\xe9\x7d\x0b\x37\xef\x9e\x1f\x1f\xbd\x62\x84\xab\x77\x91\x7f\xeb\xec\x15\x23\xdc\x3d\xe7\xd1\xf9\x1b\x00\x00\xff\xff\xc7\xe4\x19\x16\x66\x0e\x00\x00"),
|
||||||
},
|
},
|
||||||
"/templates": &vfsgen۰DirInfo{
|
"/templates": &vfsgen۰DirInfo{
|
||||||
name: "templates",
|
name: "templates",
|
||||||
@ -46,9 +46,9 @@ var assets = func() http.FileSystem {
|
|||||||
"/templates/cli_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
|
"/templates/cli_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
|
||||||
name: "cli_flags_generated.gotpl",
|
name: "cli_flags_generated.gotpl",
|
||||||
modTime: time.Time{},
|
modTime: time.Time{},
|
||||||
uncompressedSize: 2591,
|
uncompressedSize: 2638,
|
||||||
|
|
||||||
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x8f\xdb\x36\x10\x3d\x4b\xbf\x62\x6a\xe4\x20\x2d\x5c\xfb\xde\x20\xa7\x75\x36\x0d\x50\x24\x8b\xc6\xcd\x9d\x96\x86\x32\xb1\x34\xa9\x90\xa3\xdd\x2e\x0c\xff\xf7\x62\x48\xea\xc3\x1f\x58\xfb\xb2\x3d\x59\xc3\x19\xbe\xf7\xf8\x66\x48\x2f\x97\x70\x6f\x6b\x84\x06\x0d\x3a\x41\x58\xc3\xe6\x15\x64\xf3\x11\x56\xdf\xe1\xdb\xf7\x35\x7c\x5e\x7d\x5d\x2f\xf2\xbc\x15\xd5\x93\x68\x10\xf6\x7b\x58\x3c\xc6\xef\x6f\x62\x87\x70\x38\xe4\xb9\xda\xb5\xd6\x11\x14\x79\x36\x93\x5a\x34\x33\xfe\xdd\x11\xff\x78\x72\x95\x35\xcf\xfc\x49\x6a\x87\xb3\xbc\xcc\xf7\x7b\x70\xc2\x34\x08\x1f\xd4\x1c\x3e\x70\x3d\xfc\xf1\x09\x16\x0f\x5a\x34\x9e\xd1\x96\x4b\xe6\x08\x89\x45\x62\xe0\x1c\x28\x0f\x02\x42\xf9\x8b\xa2\x2d\xd0\x6b\x8b\x63\xe1\x9a\xa3\xc3\x61\x88\x57\xb6\x22\xa1\x34\xe3\x1d\x17\x4e\x11\x3d\xb9\xae\x22\xd8\xe7\x19\xaf\x66\x99\x27\xa7\x4c\x93\x67\xff\x78\xd1\x4c\xc2\xcf\xe6\xf9\xa7\x70\x63\xfc\xa0\x34\x3e\x0a\xda\x0e\x0b\x7f\xe3\xaf\x4e\x39\xac\xb3\x8d\xb5\x3a\xcf\xfe\x54\x75\x8d\x26\x4b\xd1\x5a\x3c\xa1\xe7\x2d\x29\xde\xef\x7f\x07\x25\x01\x7f\x25\x41\x3f\x85\xee\x10\xc8\x75\xc1\xca\x2c\x84\xd9\xe9\xb9\xe2\x36\x34\xf5\xf0\x3d\x85\x58\xa1\x27\x65\x04\x29\x6b\x46\xa0\xc9\x62\x76\xf7\x26\xde\x21\x67\xcf\x7f\x84\xc3\x80\x43\xea\x9c\x61\xab\x1d\x8a\x5a\x6c\x34\x82\xc3\xd6\xa1\x47\x43\x91\xc1\x4a\xa0\xad\xf2\xf0\xcc\x4a\x79\x67\x21\xad\x83\x8e\x3d\x83\x1a\xa5\xe8\x34\xf9\x32\x97\x9d\xa9\xa0\x90\x17\x8d\x2f\x13\x59\x51\x42\xb4\x90\x5b\x10\x89\x81\xf3\x31\x8b\xae\x90\x65\x12\xf7\x05\x29\xec\xef\xd5\xd1\x16\xc1\xf0\x42\x10\x83\x61\x2c\xae\x50\x26\x88\x4b\x9c\x32\x54\x26\xaa\xaf\xbe\x6f\xe7\xc0\xf6\xb2\x45\xda\xa2\x03\xeb\xc0\x58\x1a\x08\x79\x22\x5d\xaa\xbd\x42\x3e\x82\x16\x25\xf0\x1c\x1c\xb1\xf7\xb9\xa4\x20\x4c\x4c\x1c\x8b\xe1\xbc\xdc\xd5\xc9\x59\x81\xb8\x06\x44\x6c\xc2\x1c\x2c\xeb\x7b\x51\x1e\x41\x0a\xed\xf1\x8a\x9a\x91\xe0\x5c\xcd\xb0\x23\x0a\x18\xc6\xe3\x0b\x52\xb8\x16\x47\x2d\x88\x4d\x4f\x7e\xf2\x14\xdc\xde\x8b\x00\x76\xb9\x19\x21\x35\xd2\x9e\x38\x91\x18\xd2\xfc\x81\xf0\x3d\xc4\xc9\x98\x0a\x53\x83\x30\x80\xbb\x96\x5e\x19\x29\x55\xa9\x33\x13\x8d\xed\xa1\x08\x84\xd6\x8b\xeb\xda\x7b\xeb\x46\xed\xc7\xae\xa5\xab\x34\x78\x77\x0a\x04\xda\xda\x27\x0f\x5d\x1b\xa4\x44\x72\x2b\x41\x80\xb6\x95\xd0\x17\x79\xe7\xbd\x01\x47\x78\xf7\xd6\x10\xfe\x4b\xab\x78\xeb\x18\x59\xc9\x30\xa2\xd2\x76\xa6\x9f\xc9\x0a\xee\x52\x5d\x79\x06\x5d\x84\x4b\x14\xcf\x11\xb2\xbc\x1f\xa1\x07\x0e\xaf\xc5\x6c\x36\x7d\x58\xa7\x99\xb0\x8c\xda\x1f\xbd\xbc\x43\xa6\x7f\x5f\x26\xbd\xe5\x73\x77\xed\x45\x11\x73\xa8\x16\xbc\xf8\x03\x69\xb8\xf4\xda\x6e\x84\xbe\xd9\xbc\x26\x94\xbf\xa7\x7b\x97\x05\xfd\x5f\x1e\x2a\x09\xd2\xf3\x5f\x65\x74\x31\x8a\x79\x88\x96\xf5\x16\x96\x1f\xb9\xe6\xb7\x4f\x60\x54\xb8\xd4\x37\x19\x2f\x7d\x99\x67\x87\xf3\x17\xe0\xcc\x1f\xee\x4b\x70\xe5\x0d\xb8\x64\xc4\x1c\x3c\x12\xdc\x85\x74\xd2\xf8\x9e\xde\x48\xf6\xc5\x23\x2d\xfe\x0a\xca\x82\x92\x32\x5a\x36\x75\x63\x14\xf0\x28\x9c\x47\x17\xb9\x5b\xfe\xae\xe7\x80\xce\x31\xcc\xc0\x94\x6a\xa6\x2a\x4e\x4a\x65\xbc\xef\x21\xb6\xae\x30\x4a\x97\x5c\x9b\xfe\xa6\x99\x9e\x0b\x27\x02\x6e\xf0\x38\xe3\x56\x9c\x29\xbd\x17\x9e\xa2\xda\x53\x84\x49\x7e\xaa\x34\x95\x45\xc1\x13\x51\x37\xf6\x79\xdc\xf1\x5f\x00\x00\x00\xff\xff\xdb\x2f\x5d\x87\x1f\x0a\x00\x00"),
|
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x4d\x6f\xe3\x36\x10\x3d\x4b\xbf\x62\x6a\xec\x41\x0a\x5c\xfb\xde\xc5\x9e\xe2\xcd\x76\x81\x62\x37\xe8\xa6\xb9\xd3\xd2\x50\x26\x42\x93\x0a\x39\x4a\x1a\x18\xfe\xef\xc5\x90\xd4\x87\x3f\x10\xfb\x92\x9e\x2c\x72\x66\xde\x7b\x7c\x33\xa4\x97\x4b\xb8\xb5\x35\x42\x83\x06\x9d\x20\xac\x61\xfd\x06\xb2\xf9\x0c\xab\x9f\xf0\xe3\xe7\x03\x7c\x5d\x7d\x7f\x58\xe4\x79\x2b\xaa\x27\xd1\x20\xec\x76\xb0\xb8\x8f\xdf\x3f\xc4\x16\x61\xbf\xcf\x73\xb5\x6d\xad\x23\x28\xf2\x6c\x26\xb5\x68\x66\xfc\xbb\x25\xfe\xf1\xe4\x2a\x6b\x5e\xf8\x93\xd4\x16\x67\x79\x99\xef\x76\xe0\x84\x69\x10\x3e\xa9\x39\x7c\xe2\x7c\xf8\xe3\x0b\x2c\xee\xb4\x68\x3c\xa3\x2d\x97\xcc\x11\x02\x8b\xc4\xc0\x31\x50\x1e\x04\x84\xf4\x57\x45\x1b\xa0\xb7\x16\xc7\xc4\x07\x5e\xed\xf7\xc3\x7a\x65\x2b\x12\x4a\x33\xde\x61\xe2\x14\xd1\x93\xeb\x2a\x82\x5d\x9e\xf1\x6e\x96\x79\x72\xca\x34\x79\xf6\x8f\x17\xcd\x64\xf9\xd5\xbc\x3c\x0a\x37\xae\xef\x94\xc6\x7b\x41\x9b\x61\xe3\x6f\x7c\xee\x94\xc3\x3a\x5b\x5b\xab\xf3\xec\x4f\x55\xd7\x68\xb2\xb4\xda\xed\x7e\x07\x25\x01\x9f\x7b\xa5\xe2\x09\x3d\x43\x00\xb9\x2e\xd8\x97\x0d\x5b\x93\x12\x34\x75\x88\x1d\x97\x3f\x0a\xdd\x4d\x4a\xc3\x32\x3b\xb6\xe1\x7d\x88\x15\x7a\x52\x46\x90\xb2\x66\x04\x9a\x6c\x66\x37\xef\xe2\xed\x73\x6e\xd1\xaf\x70\x76\x70\x48\x9d\x33\xdc\x19\x87\xa2\x16\x6b\x8d\xe0\xb0\x75\xe8\xd1\x50\x64\xb0\x12\x68\xa3\x3c\xbc\xb0\x52\xae\x2c\xa4\x75\xd0\xb1\xc5\x50\xa3\x14\x9d\x26\x5f\xe6\xb2\x33\x15\x14\xf2\x6c\x9f\xca\x44\x56\x94\x10\x1d\xe7\x8e\x45\x62\xe0\x78\x8c\xa2\x2b\x64\x99\xc4\x7d\x43\x0a\xf5\xbd\x3a\xda\x20\x18\xde\x08\x62\x30\x4c\xd1\x05\xca\x04\x71\x8e\x53\x86\xcc\x44\xf5\xdd\xf7\xdd\x1f\xd8\x5e\x37\x48\x1b\x74\x60\x1d\x18\x4b\x03\x21\x0f\xb0\x4b\xb9\x17\xc8\x47\xd0\xa2\x04\x9e\x89\x03\xf6\x3e\x96\x14\x84\xe9\x89\x63\x31\x9c\x97\xbb\x3a\x39\x2b\x10\xe7\x80\x88\x4d\x98\x83\x65\x7d\xaf\xca\x23\x48\xa1\x3d\x5e\x50\x33\x12\x9c\xaa\x19\x2a\xa2\x80\x61\x3c\xbe\x21\x85\x5b\x74\xd0\x82\xd8\xf4\xe4\x27\x4f\xc1\xf5\xbd\x08\x60\xe7\x9b\x11\x42\x23\xed\x91\x13\x89\x21\xcd\x1f\x08\xdf\x43\x1c\x8d\xa9\x30\x35\x08\x03\xb8\x6d\xe9\x8d\x91\x52\x96\x3a\x31\xd1\xd8\x1e\x8a\x40\x68\xbd\xb8\xac\xbd\xb7\x6e\xd4\x7e\xe8\x5a\xba\x4a\x83\x77\xc7\x40\xa0\xad\x7d\xf2\xd0\xb5\x41\x4a\x24\xb7\x12\x04\x68\x5b\x09\x7d\x96\x77\xde\x1b\x70\x80\x77\x6b\x0d\xe1\xbf\xb4\x8a\xb7\x8e\x91\x95\x0c\x23\x2a\x6d\x67\xfa\x99\xac\xe0\x26\xe5\x95\x27\xd0\x45\xb8\x44\xf1\x1c\x21\xca\xf5\x08\x3d\x70\x78\x2d\x66\xb3\xe9\x3b\x3c\x8d\x84\x6d\xd4\xfe\xe0\xa1\x1e\x22\xfd\xfb\x32\xe9\x2d\x9f\xbb\x6b\xcf\x8a\x98\x43\xb5\xe0\xcd\x5f\x48\xc3\xa5\xd7\x76\x2d\xf4\xd5\xe6\x35\x21\xfd\x23\xdd\x3b\x2f\xe8\xff\xf2\x50\x49\x90\x9e\xff\x59\xa3\x8b\x51\xcc\x5d\xb4\xac\xb7\xb0\xfc\xcc\x39\xbf\x7d\x01\xa3\xc2\xa5\xbe\xca\x78\xe9\xcb\x3c\xdb\x9f\xbe\x00\x27\xfe\x70\x5f\x82\x2b\xef\xc0\x25\x23\xe6\xe0\x91\xe0\x26\x84\x93\xc6\x8f\xf4\x46\xb2\x2f\x1e\x69\xf1\x57\x50\x16\x94\x94\xd1\xb2\xa9\x1b\xa3\x80\x7b\xe1\x3c\xba\xc8\xdd\xf2\x77\x3d\x07\x74\x8e\x61\x06\xa6\x94\x33\x55\x71\x94\x2a\xe3\x7d\x0f\x6b\xeb\x0a\xa3\x74\xc9\xb9\xe9\x6f\x9a\xe9\x39\x71\x22\xe0\x0a\x8f\x33\x6e\xc5\x89\xd2\x5b\xe1\x29\xaa\x3d\x46\x98\xc4\xa7\x4a\x53\x5a\x14\x3c\x11\x75\x65\x9f\xc7\x8a\xff\x02\x00\x00\xff\xff\x73\xc9\x52\x5f\x4e\x0a\x00\x00"),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"dest": true,
|
"dest": true,
|
||||||
"context_default": "false",
|
"context_default": "false",
|
||||||
"parser": "strconv.ParseBool(f.Value.String())",
|
"parser": "strconv.ParseBool(f.Value.String())",
|
||||||
"valueString": "return \"\""
|
"valueString": "return \"\"",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BoolT",
|
"name": "BoolT",
|
||||||
@ -16,7 +17,8 @@
|
|||||||
"doctail": " that is true by default",
|
"doctail": " that is true by default",
|
||||||
"context_default": "false",
|
"context_default": "false",
|
||||||
"parser": "strconv.ParseBool(f.Value.String())",
|
"parser": "strconv.ParseBool(f.Value.String())",
|
||||||
"valueString": "return \"\""
|
"valueString": "return \"\"",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Duration",
|
"name": "Duration",
|
||||||
@ -26,7 +28,8 @@
|
|||||||
"doctail": " (see https://golang.org/pkg/time/#ParseDuration)",
|
"doctail": " (see https://golang.org/pkg/time/#ParseDuration)",
|
||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "time.ParseDuration(f.Value.String())",
|
"parser": "time.ParseDuration(f.Value.String())",
|
||||||
"valueString": "return f.Value.String()"
|
"valueString": "return f.Value.String()",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Float64",
|
"name": "Float64",
|
||||||
@ -35,7 +38,8 @@
|
|||||||
"dest": true,
|
"dest": true,
|
||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "strconv.ParseFloat(f.Value.String(), 64)",
|
"parser": "strconv.ParseFloat(f.Value.String(), 64)",
|
||||||
"valueString": "return fmt.Sprintf(\"%f\", f.Value)"
|
"valueString": "return fmt.Sprintf(\"%f\", f.Value)",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Generic",
|
"name": "Generic",
|
||||||
@ -44,7 +48,8 @@
|
|||||||
"dest": false,
|
"dest": false,
|
||||||
"context_default": "nil",
|
"context_default": "nil",
|
||||||
"context_type": "interface{}",
|
"context_type": "interface{}",
|
||||||
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\""
|
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"",
|
||||||
|
"takes_file": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Int64",
|
"name": "Int64",
|
||||||
@ -53,7 +58,8 @@
|
|||||||
"dest": true,
|
"dest": true,
|
||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
|
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
|
||||||
"valueString": "return fmt.Sprintf(\"%d\", f.Value)"
|
"valueString": "return fmt.Sprintf(\"%d\", f.Value)",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Int",
|
"name": "Int",
|
||||||
@ -63,7 +69,8 @@
|
|||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
|
"parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
|
||||||
"parser_cast": "int(parsed)",
|
"parser_cast": "int(parsed)",
|
||||||
"valueString": "return fmt.Sprintf(\"%d\", f.Value)"
|
"valueString": "return fmt.Sprintf(\"%d\", f.Value)",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "IntSlice",
|
"name": "IntSlice",
|
||||||
@ -73,7 +80,8 @@
|
|||||||
"context_default": "nil",
|
"context_default": "nil",
|
||||||
"context_type": "[]int",
|
"context_type": "[]int",
|
||||||
"parser": "(f.Value.(*IntSlice)).Value(), error(nil)",
|
"parser": "(f.Value.(*IntSlice)).Value(), error(nil)",
|
||||||
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\""
|
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Int64Slice",
|
"name": "Int64Slice",
|
||||||
@ -83,7 +91,8 @@
|
|||||||
"context_default": "nil",
|
"context_default": "nil",
|
||||||
"context_type": "[]int64",
|
"context_type": "[]int64",
|
||||||
"parser": "(f.Value.(*Int64Slice)).Value(), error(nil)",
|
"parser": "(f.Value.(*Int64Slice)).Value(), error(nil)",
|
||||||
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\""
|
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "String",
|
"name": "String",
|
||||||
@ -92,7 +101,8 @@
|
|||||||
"dest": true,
|
"dest": true,
|
||||||
"context_default": "\"\"",
|
"context_default": "\"\"",
|
||||||
"parser": "f.Value.String(), error(nil)",
|
"parser": "f.Value.String(), error(nil)",
|
||||||
"valueString": "return f.Value"
|
"valueString": "return f.Value",
|
||||||
|
"takes_file": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "StringSlice",
|
"name": "StringSlice",
|
||||||
@ -102,7 +112,8 @@
|
|||||||
"context_default": "nil",
|
"context_default": "nil",
|
||||||
"context_type": "[]string",
|
"context_type": "[]string",
|
||||||
"parser": "(f.Value.(*StringSlice)).Value(), error(nil)",
|
"parser": "(f.Value.(*StringSlice)).Value(), error(nil)",
|
||||||
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\""
|
"valueString": "if f.Value != nil {\n\t\treturn f.Value.String()\n\t}\n\treturn \"\"",
|
||||||
|
"takes_file": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Uint64",
|
"name": "Uint64",
|
||||||
@ -111,7 +122,8 @@
|
|||||||
"dest": true,
|
"dest": true,
|
||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
|
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
|
||||||
"valueString": "return fmt.Sprintf(\"%d\", f.Value)"
|
"valueString": "return fmt.Sprintf(\"%d\", f.Value)",
|
||||||
|
"takes_file": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Uint",
|
"name": "Uint",
|
||||||
@ -121,6 +133,7 @@
|
|||||||
"context_default": "0",
|
"context_default": "0",
|
||||||
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
|
"parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
|
||||||
"parser_cast": "uint(parsed)",
|
"parser_cast": "uint(parsed)",
|
||||||
"valueString": "return fmt.Sprintf(\"%d\", f.Value)"
|
"valueString": "return fmt.Sprintf(\"%d\", f.Value)",
|
||||||
|
"takes_file": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -17,7 +17,9 @@ type {{ $flag.Name }}Flag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
|
{{- if eq $flag.TakesFile true }}
|
||||||
TakesFile bool
|
TakesFile bool
|
||||||
|
{{- end }}
|
||||||
{{- if eq $flag.Value true }}
|
{{- if eq $flag.Value true }}
|
||||||
Value {{ $flag.Type }}
|
Value {{ $flag.Type }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -17,7 +17,6 @@ type BoolFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Destination *bool
|
Destination *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,6 @@ type BoolTFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Destination *bool
|
Destination *bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +157,6 @@ type DurationFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value time.Duration
|
Value time.Duration
|
||||||
Destination *time.Duration
|
Destination *time.Duration
|
||||||
}
|
}
|
||||||
@ -231,7 +228,6 @@ type Float64Flag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value float64
|
Value float64
|
||||||
Destination *float64
|
Destination *float64
|
||||||
}
|
}
|
||||||
@ -377,7 +373,6 @@ type Int64Flag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value int64
|
Value int64
|
||||||
Destination *int64
|
Destination *int64
|
||||||
}
|
}
|
||||||
@ -449,7 +444,6 @@ type IntFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value int
|
Value int
|
||||||
Destination *int
|
Destination *int
|
||||||
}
|
}
|
||||||
@ -521,7 +515,6 @@ type IntSliceFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value *IntSlice
|
Value *IntSlice
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -595,7 +588,6 @@ type Int64SliceFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value *Int64Slice
|
Value *Int64Slice
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -815,7 +807,6 @@ type Uint64Flag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value uint64
|
Value uint64
|
||||||
Destination *uint64
|
Destination *uint64
|
||||||
}
|
}
|
||||||
@ -887,7 +878,6 @@ type UintFlag struct {
|
|||||||
FilePath string
|
FilePath string
|
||||||
Required bool
|
Required bool
|
||||||
Hidden bool
|
Hidden bool
|
||||||
TakesFile bool
|
|
||||||
Value uint
|
Value uint
|
||||||
Destination *uint
|
Destination *uint
|
||||||
}
|
}
|
||||||
|
2
go.mod
2
go.mod
@ -5,7 +5,5 @@ go 1.10
|
|||||||
require (
|
require (
|
||||||
github.com/BurntSushi/toml v0.3.1
|
github.com/BurntSushi/toml v0.3.1
|
||||||
github.com/cpuguy83/go-md2man v1.0.10
|
github.com/cpuguy83/go-md2man v1.0.10
|
||||||
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
|
|
||||||
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd // indirect
|
|
||||||
gopkg.in/yaml.v2 v2.2.2
|
gopkg.in/yaml.v2 v2.2.2
|
||||||
)
|
)
|
||||||
|
4
go.sum
4
go.sum
@ -4,10 +4,6 @@ github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF
|
|||||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||||
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk=
|
|
||||||
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
|
|
||||||
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd h1:ug7PpSOB5RBPK1Kg6qskGBoP3Vnj/aNYFTznWvlkGo0=
|
|
||||||
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
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/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 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||||
|
Loading…
Reference in New Issue
Block a user