main
Ajitem Sahasrabuddhe 5 years ago
parent 58ae5eb590
commit 7a6f3d4394
No known key found for this signature in database
GPG Key ID: 5B0EE10DAA76876C

@ -16,7 +16,7 @@ type BoolFlag struct {
// NewBoolFlag creates a new BoolFlag
func NewBoolFlag(fl cli.BoolFlag) *BoolFlag {
return &BoolFlag{BoolFlag: fl, set: nil}
return &BoolFlag{ BoolFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -42,7 +42,7 @@ type BoolTFlag struct {
// NewBoolTFlag creates a new BoolTFlag
func NewBoolTFlag(fl cli.BoolTFlag) *BoolTFlag {
return &BoolTFlag{BoolTFlag: fl, set: nil}
return &BoolTFlag{ BoolTFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -68,7 +68,7 @@ type DurationFlag struct {
// NewDurationFlag creates a new DurationFlag
func NewDurationFlag(fl cli.DurationFlag) *DurationFlag {
return &DurationFlag{DurationFlag: fl, set: nil}
return &DurationFlag{ DurationFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -94,7 +94,7 @@ type Float64Flag struct {
// NewFloat64Flag creates a new Float64Flag
func NewFloat64Flag(fl cli.Float64Flag) *Float64Flag {
return &Float64Flag{Float64Flag: fl, set: nil}
return &Float64Flag{ Float64Flag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -120,7 +120,7 @@ type GenericFlag struct {
// NewGenericFlag creates a new GenericFlag
func NewGenericFlag(fl cli.GenericFlag) *GenericFlag {
return &GenericFlag{GenericFlag: fl, set: nil}
return &GenericFlag{ GenericFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -146,7 +146,7 @@ type Int64Flag struct {
// NewInt64Flag creates a new Int64Flag
func NewInt64Flag(fl cli.Int64Flag) *Int64Flag {
return &Int64Flag{Int64Flag: fl, set: nil}
return &Int64Flag{ Int64Flag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -172,7 +172,7 @@ type IntFlag struct {
// NewIntFlag creates a new IntFlag
func NewIntFlag(fl cli.IntFlag) *IntFlag {
return &IntFlag{IntFlag: fl, set: nil}
return &IntFlag{ IntFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -198,7 +198,7 @@ type IntSliceFlag struct {
// NewIntSliceFlag creates a new IntSliceFlag
func NewIntSliceFlag(fl cli.IntSliceFlag) *IntSliceFlag {
return &IntSliceFlag{IntSliceFlag: fl, set: nil}
return &IntSliceFlag{ IntSliceFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -224,7 +224,7 @@ type Int64SliceFlag struct {
// NewInt64SliceFlag creates a new Int64SliceFlag
func NewInt64SliceFlag(fl cli.Int64SliceFlag) *Int64SliceFlag {
return &Int64SliceFlag{Int64SliceFlag: fl, set: nil}
return &Int64SliceFlag{ Int64SliceFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -250,7 +250,7 @@ type StringFlag struct {
// NewStringFlag creates a new StringFlag
func NewStringFlag(fl cli.StringFlag) *StringFlag {
return &StringFlag{StringFlag: fl, set: nil}
return &StringFlag{ StringFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -276,7 +276,7 @@ type StringSliceFlag struct {
// NewStringSliceFlag creates a new StringSliceFlag
func NewStringSliceFlag(fl cli.StringSliceFlag) *StringSliceFlag {
return &StringSliceFlag{StringSliceFlag: fl, set: nil}
return &StringSliceFlag{ StringSliceFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -302,7 +302,7 @@ type Uint64Flag struct {
// NewUint64Flag creates a new Uint64Flag
func NewUint64Flag(fl cli.Uint64Flag) *Uint64Flag {
return &Uint64Flag{Uint64Flag: fl, set: nil}
return &Uint64Flag{ Uint64Flag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -328,7 +328,7 @@ type UintFlag struct {
// NewUintFlag creates a new UintFlag
func NewUintFlag(fl cli.UintFlag) *UintFlag {
return &UintFlag{UintFlag: fl, set: nil}
return &UintFlag{ UintFlag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls

@ -21,6 +21,6 @@ install:
build_script:
- go run build/build.go generate
- go rub build/build.go vet
- go rub build/build.go test
- go rub build/build.go gfmrun
- go run build/build.go vet
- go run build/build.go test
- go run build/build.go gfmrun

@ -34,21 +34,21 @@ var assets = func() http.FileSystem {
},
"/templates": &vfsgen۰DirInfo{
name: "templates",
modTime: time.Date(2019, 8, 4, 5, 32, 59, 292856915, time.UTC),
modTime: time.Date(2019, 8, 4, 14, 51, 15, 358024804, time.UTC),
},
"/templates/altsrc_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
name: "altsrc_flags_generated.gotpl",
modTime: time.Date(2019, 8, 4, 5, 32, 59, 176187795, time.UTC),
uncompressedSize: 1062,
modTime: time.Date(2019, 8, 4, 14, 47, 17, 700754849, time.UTC),
uncompressedSize: 1044,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x92\x41\x8b\xdb\x30\x10\x85\xcf\xab\x5f\xf1\x08\x4b\x89\x97\x60\xdf\x53\xf6\x50\xba\x5b\xe8\x25\x5b\xd8\x85\x9e\x15\x7b\x64\x8b\x2a\xb6\x91\xc6\x09\x41\xf8\xbf\x97\x91\x97\x34\xa5\x4a\xe9\xa5\x37\x59\xa3\xf7\xde\x7c\x33\xae\x2a\x7c\x1e\x1a\x42\x4b\x3d\x79\xcd\xd4\x60\x7f\x86\x69\x3f\xe2\xe9\x05\xbb\x97\x37\x3c\x3f\x7d\x7d\x2b\x95\x1a\x75\xfd\x43\xb7\x84\x18\x51\x7e\x5b\xce\x3b\x7d\x20\xcc\xb3\x52\xf6\x30\x0e\x9e\xb1\x56\x77\x2b\xe3\x74\xbb\x52\x00\xb0\x6a\x2d\x77\xd3\xbe\xac\x87\x43\x35\x79\xa3\x8f\x54\xd5\xce\xae\x54\xa1\x62\x84\xd7\x7d\x4b\xb8\xb7\x1b\xdc\x8b\x02\xdb\x47\x94\x5f\x9c\x6e\x83\xf8\x55\x95\xa4\xa4\x42\xf9\x9e\x21\x35\xd8\x00\xee\x08\x49\xc0\xe7\x91\xc0\x9d\x66\x9c\xbc\x1e\x03\x6a\x67\xcb\xac\x88\x07\x68\xe7\x86\x93\xb8\x9a\xc1\x63\xe0\x8e\x3c\x8e\xda\x4d\x14\xa4\xb8\x27\x84\x91\x6a\x6b\x2c\x35\x2a\xb9\x66\x6d\x02\xfb\xa9\x66\xc4\x84\x76\x2b\x2c\x15\x03\x31\x1e\x52\x45\xae\x5e\x89\xd5\xac\x24\x7c\x47\xa7\xac\x73\xed\x49\x33\x05\x68\xf4\x74\xca\x86\x2b\x33\xf5\xf5\x2d\xfd\xda\xb8\x9b\xfd\x14\x78\xc8\x46\x2e\x14\x9e\x78\xf2\x3d\x3e\xe4\x9e\xc4\x6c\x23\x5b\x18\xb7\x11\xc0\x2d\x7a\xeb\x30\xbf\x93\x7d\x1a\x47\x77\x46\xd0\x47\xfa\xb5\xa0\x57\xe2\x34\x6e\xa7\x99\x3c\xa6\x20\xbf\x4e\xad\x9d\x0b\x1b\x79\xd2\x2f\x67\x11\x8b\x40\x56\x38\x52\x93\xcd\x2c\x93\xfb\x32\x82\xb5\xc9\x03\x15\x4b\x0b\xeb\x3f\x46\x5f\x20\xaa\x3b\x53\xca\xfd\xa3\xf4\x2d\x1f\xb7\x43\x44\x5f\x5c\x33\x7d\xb7\xdc\x3d\x7b\x3f\xf8\xff\x0b\x77\x89\xf9\x27\xca\xcb\xeb\x1c\x2e\xa5\x6e\x97\xfd\x5e\x73\x5f\xed\xfb\x6f\x13\xf8\xcd\x5b\x46\x11\x23\xa8\x6f\x30\xcf\x3f\x03\x00\x00\xff\xff\xb0\x66\x7b\xfe\x26\x04\x00\x00"),
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x92\x4f\x8b\xdb\x30\x10\xc5\xcf\xd6\xa7\x78\x84\xa5\xc4\x4b\xb0\xef\x29\x7b\x28\xdd\x2d\xf4\x92\x2d\xec\x42\xcf\x8a\x3c\xb2\x45\x15\xdb\x48\xe3\x84\x20\xfc\xdd\xcb\x38\x61\xfb\x4f\x29\xbd\xf4\x66\x69\xf4\xde\x9b\xdf\x8c\xeb\x1a\x1f\x87\x86\xd0\x52\x4f\x41\x33\x35\xd8\x9f\x61\xdb\xf7\x78\x7c\xc6\xee\xf9\x15\x4f\x8f\x9f\x5f\x2b\xa5\x46\x6d\xbe\xe9\x96\x90\x12\xaa\x2f\x97\xef\x9d\x3e\x10\xe6\x59\x29\x77\x18\x87\xc0\x58\xab\x62\x65\xbd\x6e\x57\xaa\x58\xb5\x8e\xbb\x69\x5f\x99\xe1\x50\x4f\xc1\xea\x23\xd5\xc6\xbb\x95\x2a\x55\x4a\x08\xba\x6f\x09\x77\x6e\x83\x3b\x79\x8e\xed\x03\xaa\x4f\x5e\xb7\x51\xcc\xea\x5a\x22\x96\x42\x75\x0d\x90\x1a\x5c\x04\x77\x84\x45\xc0\xe7\x91\xc0\x9d\x66\x9c\x82\x1e\x23\x8c\x77\x55\x56\xc4\x03\xb4\xf7\xc3\x49\x5c\xed\x10\x30\x70\x47\x01\x47\xed\x27\x8a\x52\xdc\x13\xe2\x48\xc6\x59\x47\x8d\x5a\x5c\xb3\x36\x91\xc3\x64\x18\x49\x15\xb7\x92\x54\x11\x89\x71\xbf\x5c\xcb\xf9\x85\x58\xcd\x4a\x62\x77\x74\xca\x7a\x9a\x40\x9a\x29\x42\xa3\xa7\x53\x36\x56\xd9\xa9\x37\xb7\xf4\x6b\xeb\x6f\x62\x97\xb8\xcf\x46\x26\x55\x04\xe2\x29\xf4\x78\x97\xab\xa7\x6c\x17\x5b\x58\xbf\x41\x24\xde\xa2\x77\x1e\xf3\x15\xeb\xc3\x38\xfa\x33\xa2\x3e\xd2\x8f\xbd\xbc\x10\x2f\x53\xf6\x9a\x29\x60\x8a\xf2\xbb\x18\xed\x7d\xdc\xc8\x93\xfe\xf2\x2d\x62\x11\xc8\xe6\x46\x6a\xb2\x99\xd5\xe2\x7e\xe1\x5f\xdb\x3c\x4d\x79\x69\x61\xfd\xc7\xdc\x4b\xe1\xb4\x95\xdc\x3f\x48\xdf\x72\xb8\x1d\x22\xfa\xf2\x67\xa6\xaf\x8e\xbb\xa7\x10\x86\xf0\x7f\xe1\xde\x62\xfe\x89\xf2\xed\x75\x0e\x97\x96\x6e\x7f\x87\xbe\x6e\xfa\x6f\xec\xbf\xb8\xca\x10\x52\x02\xf5\x0d\xe6\xf9\x7b\x00\x00\x00\xff\xff\x6d\x3d\x9e\xe0\x14\x04\x00\x00"),
},
"/templates/cli_flags_generated.gotpl": &vfsgen۰CompressedFileInfo{
name: "cli_flags_generated.gotpl",
modTime: time.Date(2019, 8, 4, 5, 32, 38, 55742173, time.UTC),
uncompressedSize: 2230,
modTime: time.Date(2019, 8, 4, 14, 51, 15, 321357993, time.UTC),
uncompressedSize: 2102,
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x55\x41\x4f\xeb\x38\x10\x3e\x37\xbf\x62\xb6\xe2\x90\xa0\x6e\x7b\x5f\xc4\x89\xc2\x2e\xd2\x0a\xd0\x83\xc7\xdd\x4d\xc6\xa9\x85\xb1\x8b\xed\xc0\x43\x51\xff\xfb\xd3\x8c\x9d\xb4\x4d\x0b\xf4\xc2\xeb\xc9\x9e\xf9\xfc\xcd\x37\xdf\x8c\x9a\xd9\x0c\x2e\x6c\x85\x50\xa3\x41\x27\x02\x56\xb0\x78\x07\x59\x9f\xc1\xfc\x16\x6e\x6e\x1f\xe0\x72\x7e\xfd\x30\xcd\xb2\x95\x28\x9f\x44\x8d\xd0\xb6\x30\xbd\x8b\xe7\x1b\xf1\x8c\xb0\x5e\x67\x99\x7a\x5e\x59\x17\x20\xcf\x46\x63\xa9\x45\x3d\xce\x46\x63\x1f\x5c\x69\xcd\x2b\x1d\x83\x7a\xc6\x71\x56\x64\x6d\x0b\x4e\x98\x1a\xe1\x44\x4d\xe0\x84\x80\xf0\xcf\x39\x4c\xaf\xb4\xa8\x3d\xd1\xcc\x66\x44\xce\x89\x69\xa2\xa6\x1c\x28\x0f\x02\x18\xfe\xa6\xc2\x12\xc2\xfb\x0a\x37\xc0\x07\xba\xad\xd7\xfd\x7d\x6e\xcb\x20\x94\x26\xbe\x5d\xe0\x36\xa3\x0f\xae\x29\x03\xb4\x19\x00\x00\x27\xd2\xcf\x07\xa7\x4c\xcd\xe1\x9f\x9e\xba\xdd\x0b\x5f\x9a\xd7\x47\xe1\xf6\xc2\x57\x4a\xe3\x9d\x08\xcb\x41\xf8\x07\xbe\x34\xca\x61\x45\xe7\x85\xb5\x9a\x83\xff\xa9\xaa\x42\x13\x29\xfa\x60\xdb\xfe\x0d\x4a\x02\xbe\x24\xb9\x8f\x42\x37\x08\xc1\x35\xec\xf0\x88\xaf\xa3\xd1\xb0\xed\x6c\x44\xef\xd0\x54\xfd\x79\x9b\x63\x8e\x3e\x28\x23\x82\xb2\x66\xc3\xb4\x15\x1c\x9d\x7e\xca\xb7\xce\x68\x24\xf7\xdc\x0d\x38\x0c\x8d\x33\x34\x09\x87\xa2\x12\x0b\x8d\xe0\x70\xe5\xd0\xa3\x09\xb1\x82\x95\x10\x96\xca\xc3\x2b\x49\xa5\x97\xb9\xb4\x0e\x1a\xb6\xb1\x42\x29\x1a\x1d\x7c\x91\xc9\xc6\x94\x90\xcb\x83\x73\x29\x52\xb1\xbc\x48\x1e\xa6\x09\xc5\xda\x40\x90\x08\x40\x97\xcb\x22\xe9\xfb\x17\x03\x53\x74\x02\xc3\x12\xc1\x50\x80\xf5\x20\x2f\xce\x17\x55\x13\xc5\x07\x65\x25\x83\x53\xb5\x6b\xdf\x8f\xb4\x2b\xf8\xb6\xc4\xb0\x44\x07\xd6\x81\xb1\xa1\xaf\x49\x6b\xeb\x12\xf6\x8b\xfa\x1b\xd2\xbc\xe0\x8d\x18\x0a\xe8\xd2\x49\xc4\x90\x05\xb4\xb5\x4f\x1e\x9a\x15\x17\x67\xff\xa9\x7b\x01\xda\x96\x42\x1f\x2c\x3a\xe9\xe4\xef\xf0\x5d\x58\x13\xf0\x57\x98\xc7\x69\x11\xb3\x92\xdc\x94\xb4\x8d\xe9\xba\x28\xe1\x34\xe1\x8a\x3d\xea\x9c\x9d\x8f\x2e\x16\x6d\xcb\xcf\x11\x3a\x5e\x5e\xb2\xf1\x98\x78\x87\x25\xd3\xfe\x51\x1c\xb5\xc7\x1d\xc8\x26\xd7\xad\xe6\xae\x3f\xd4\x7d\xb3\x3a\x28\x65\x02\xe5\x94\x82\xf7\x18\xfa\x7d\xd1\x76\x21\xf4\xd1\x16\xd6\x0c\xff\x4e\x0f\x0f\x0b\xfa\xb3\x4e\x2a\x09\xd2\xd3\xbf\x71\xf4\x32\x4a\xba\x8a\xc6\x75\x46\x16\x67\x84\xf9\xeb\x1c\x8c\xea\x16\xf4\xd8\x21\x48\x5f\x30\x7e\xbd\x3d\xb6\x8f\x1d\xa3\x49\xb1\x4f\x9f\x90\x26\x6b\x26\xe0\x31\xc0\x29\xa7\x93\xde\xef\x77\x4b\x92\x53\x1e\xc3\xf4\x7f\xd6\xc7\x7a\x8a\xde\xc7\x7d\x8b\x36\x82\xee\x84\xf3\xe8\xa2\x96\x15\x9d\xab\x09\xa0\x73\xc4\xd7\x97\x4d\x18\xfe\xa6\x25\x4d\x03\xa8\x8c\x5f\x07\xbe\x5b\x97\x1b\xa5\xa9\xe7\xf4\xaf\xdd\x15\xa5\x0f\x81\x73\xfb\x62\x8e\x9b\x40\x87\x5c\x7f\xd8\xc4\x85\xf0\x21\x36\x32\x64\xdb\xca\x6f\x37\x91\x60\xb1\x97\x5d\xbd\xc7\xef\x45\xff\xee\x77\x00\x00\x00\xff\xff\x4d\xaf\x90\xd0\xb6\x08\x00\x00"),
compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x54\xc1\x52\xdb\x30\x10\x3d\xdb\x5f\xb1\xcd\x70\xb0\x99\x34\xb9\x97\xe1\x44\xa0\x65\xa6\x03\x4c\xa1\xdc\x15\x7b\xe5\x68\x10\x52\x90\xd6\x50\x26\x93\x7f\xef\xac\x24\x3b\x4e\x48\x21\x17\x7a\xd3\x6a\x9f\xde\x7b\x7a\x5a\x7b\x3a\x85\x33\x5b\x23\x34\x68\xd0\x09\xc2\x1a\xe6\xaf\x20\x9b\x13\x98\x5d\xc3\xd5\xf5\x1d\x9c\xcf\x2e\xef\x26\x79\xbe\x14\xd5\x83\x68\x10\x56\x2b\x98\xdc\xc4\xf5\x95\x78\x44\x58\xaf\xf3\x5c\x3d\x2e\xad\x23\x28\xf2\x6c\x24\xb5\x68\x46\x79\x36\xf2\xe4\x2a\x6b\x9e\x79\x49\xea\x11\x47\x79\x99\xaf\x56\xe0\x84\x69\x10\x8e\xd4\x18\x8e\x18\x08\xdf\x4e\x61\x72\xa1\x45\xe3\x99\x66\x3a\x65\xf2\xd0\x98\x24\x6a\xee\x81\xf2\x20\x20\xc0\x5f\x14\x2d\x80\x5e\x97\xb8\x01\xde\x71\xb5\x5e\xf7\xf5\xcc\x56\x24\x94\x66\xbe\x6d\xe0\x90\xd1\x93\x6b\x2b\x82\x55\x9e\xf1\x6e\x96\x79\x72\xca\x34\x79\xf6\xdb\x8b\x66\x50\x9e\x9b\xe7\x7b\xe1\x36\xf5\x85\xd2\x78\x23\x68\xd1\x6f\xfc\xc2\xa7\x56\x39\xac\xb3\xb9\xb5\x3a\xcf\x7e\xa8\xba\x46\x93\xa5\x6a\xb5\xfa\x0a\x4a\x02\x3e\x25\x03\xf7\x42\xb7\x08\xe4\xda\x90\x59\x16\xca\x6c\xf7\x1e\xf1\x18\x9a\xba\x5f\x0f\x29\x66\xe8\x49\x19\x41\xca\x9a\x0d\xd1\x60\x33\x3b\x7e\x97\x6f\x9d\x73\xc6\xb7\xc1\x3c\x38\xa4\xd6\x19\x8e\xd6\xa1\xa8\xc5\x5c\x23\x38\x5c\x3a\xf4\x68\x28\x2a\x58\x09\xb4\x50\x1e\x9e\xd9\x29\x9f\x2c\xa4\x75\xd0\x72\x46\x50\xa3\x14\xad\x26\x5f\xe6\xb2\x35\x15\x14\x72\x6f\xd0\x65\x12\x2b\x4a\x88\x91\x71\xe4\x51\x18\xb8\x1f\xbb\xe8\x0a\x59\x26\x73\xdf\x91\xc2\xf9\xce\x1d\x2d\x10\x0c\x6f\x04\x33\x18\xc6\xe0\x03\xc9\x44\xb1\x4f\x53\x06\x64\x92\xba\xf4\xdd\xf3\xf5\x6a\x2f\x0b\xa4\x05\x3a\xb0\x0e\x8c\xa5\x5e\x90\x27\xd0\x25\xec\x07\xe2\x1b\xd2\xa2\x04\x9e\x83\x2d\xf5\xae\x97\x1c\xec\x52\x80\xb6\xf6\xc1\x43\xbb\x0c\xca\x21\x76\xbe\xb7\x00\x6d\x2b\xa1\xf7\x2a\x8e\x3b\xef\x5b\x7c\x67\xd6\x10\xfe\xa1\x59\x7c\x24\x66\x56\x32\xdc\x48\xda\xd6\x74\x57\xa8\xe0\x38\xe1\xca\x37\xd4\x45\xc8\x3c\xe6\x17\xba\x7c\x1e\xa1\x23\x0e\xc3\x35\x1a\x0d\xbf\xbb\x61\x27\x6c\xa3\xf6\x5b\x1f\x66\xdf\xe9\xc6\x71\x90\x0c\xdf\xbb\x5d\xee\x35\x31\x86\x6a\xc2\x9b\xb7\x48\xfd\x8c\x68\x3b\x17\xfa\xe0\xf0\x9a\x00\xff\xcc\xf4\xf6\x1b\xfa\x5f\x19\x2a\x09\xd2\xf3\x9f\x34\xa6\x18\xcd\x5c\xc4\xc8\xba\x08\xcb\x13\xc6\x7c\x39\x05\xa3\xc2\x44\x1e\x14\xbc\xf4\x65\x9e\xad\xfb\x47\xfa\x77\x3e\xfc\x2e\x21\x95\x77\xe8\x52\x10\x63\xf0\x48\x70\x1c\xda\xc9\xe3\x67\x66\x23\x39\x17\x8f\x34\xf9\x19\x9c\x05\x27\x65\x8c\x6c\x98\xc6\xc6\xc0\x8d\x70\x1e\x5d\xd4\x5e\xf2\xba\x1e\x03\x3a\xc7\x34\xbd\x52\xc2\x0c\x5d\xec\x40\x65\xfc\xd9\x87\xda\xba\xc2\x28\x5d\x32\x36\xfd\xd5\x59\x9e\x81\x03\x03\x07\x64\x9c\xf1\x53\xbc\x71\x7a\x26\x3c\x45\xb7\xbb\x0c\x83\xfe\xd0\x69\x82\x45\xc3\x03\x53\x07\xbe\x73\x7f\xe2\x6f\x00\x00\x00\xff\xff\x9b\xde\x9c\x04\x36\x08\x00\x00"),
},
}
fs["/"].(*vfsgen۰DirInfo).entries = []os.FileInfo{

@ -4,19 +4,19 @@ package {{ .PackageName }}
import (
"flag"
"github.com/urfave/cli"
"github.com/urfave/cli"
)
{{ range $i, $flag := .Flags }}
// {{ $flag.Name }}Flag is the flag type that wraps cli.{{ $flag.Name }}Flag to allow
// for other values to be specified
type {{ $flag.Name }}Flag struct {
cli.{{ $flag.Name }}Flag
set *flag.FlagSet
cli.{{ $flag.Name }}Flag
set *flag.FlagSet
}
// New{{ $flag.Name }}Flag creates a new {{ $flag.Name }}Flag
func New{{ $flag.Name }}Flag(fl cli.{{ $flag.Name }}Flag) *{{ $flag.Name }}Flag {
return &{{ $flag.Name }}Flag{ {{ $flag.Name }}Flag: fl, set: nil }
return &{{ $flag.Name }}Flag{ {{ $flag.Name }}Flag: fl, set: nil }
}
// Apply saves the flagSet for later usage calls, then calls
@ -29,7 +29,7 @@ func (f *{{ $flag.Name }}Flag) Apply(set *flag.FlagSet) {
// ApplyWithError saves the flagSet for later usage calls, then calls
// the wrapped {{ $flag.Name }}Flag.ApplyWithError
func (f *{{ $flag.Name }}Flag) ApplyWithError(set *flag.FlagSet) error {
f.set = set
return f.{{ $flag.Name }}Flag.ApplyWithError(set)
f.set = set
return f.{{ $flag.Name }}Flag.ApplyWithError(set)
}
{{ end }}

@ -10,14 +10,14 @@ import (
{{ range $i, $flag := .Flags }}
// {{ $flag.Name }}Flag is a flag with type {{ $flag.Type }}{{ $flag.Doctail }}
type {{ $flag.Name }}Flag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
{{- if eq $flag.Value true }}
Value {{ $flag.Type }}
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
{{- if eq $flag.Value true }}
Value {{ $flag.Type }}
{{- end }}
{{- if eq $flag.Destination true }}
Destination *{{ $flag.Type }}
@ -27,43 +27,43 @@ type {{ $flag.Name }}Flag struct {
// String returns a readable representation of this value
// (for usage defaults)
func (f {{ $flag.Name }}Flag) String() string {
return FlagStringer(f)
return FlagStringer(f)
}
// GetName returns the name of the flag
func (f {{ $flag.Name }}Flag) GetName() string {
return f.Name
return f.Name
}
// IsRequired returns whether or not the flag is required
func (f {{ $flag.Name }}Flag) IsRequired() bool {
return f.Required
return f.Required
}
// {{ $flag.Name }} looks up the value of a local {{ $flag.Name }}Flag, returns
// {{ $flag.ContextDefault }} if not found
func (c *Context) {{ $flag.Name }}(name string){{ if ne .ContextType "" }} {{ $flag.ContextType }} {{ else }} {{ $flag.Type }} {{- end }} {
return lookup{{ $flag.Name }}(name, c.flagSet)
func (c *Context) {{ $flag.Name }}(name string) {{ if ne .ContextType "" }}{{ $flag.ContextType }}{{ else }}{{ $flag.Type }}{{- end }} {
return lookup{{ $flag.Name }}(name, c.flagSet)
}
// Global{{ $flag.Name }} looks up the value of a global {{ $flag.Name }}Flag, returns
// {{ $flag.ContextDefault }} if not found
func (c *Context) Global{{ $flag.Name }}(name string){{ if ne .ContextType "" }} {{ $flag.ContextType }} {{ else }} {{ $flag.Type }} {{- end }} {
if fs := lookupGlobalFlagSet(name, c); fs != nil {
return lookup{{ $flag.Name }}(name, fs)
}
return {{ $flag.ContextDefault }}
func (c *Context) Global{{ $flag.Name }}(name string) {{ if ne .ContextType "" }}{{ $flag.ContextType }}{{ else }}{{ $flag.Type }}{{- end }} {
if fs := lookupGlobalFlagSet(name, c); fs != nil {
return lookup{{ $flag.Name }}(name, fs)
}
return {{ $flag.ContextDefault }}
}
func lookup{{ $flag.Name }}(name string, set *flag.FlagSet){{ if ne .ContextType "" }} {{ $flag.ContextType }} {{ else }} {{ $flag.Type }} {{- end }} {
f := set.Lookup(name)
if f != nil {
{{ if ne .Parser "" }}parsed, err := {{ $flag.Parser }}{{ else }}parsed, err := f.Value, error(nil){{ end }}
if err != nil {
return {{ $flag.ContextDefault }}
}
{{ if ne .ParserCast "" }}return {{ $flag.ParserCast }}{{ else }}return parsed{{ end }}
}
return {{ $flag.ContextDefault }}
func lookup{{ $flag.Name }}(name string, set *flag.FlagSet) {{ if ne .ContextType "" }}{{ $flag.ContextType }}{{ else }}{{ $flag.Type }}{{- end }} {
f := set.Lookup(name)
if f != nil {
{{ if ne .Parser "" }}parsed, err := {{ $flag.Parser }}{{ else }}parsed, err := f.Value, error(nil){{ end }}
if err != nil {
return {{ $flag.ContextDefault }}
}
{{ if ne .ParserCast "" }}return {{ $flag.ParserCast }}{{ else }}return parsed{{ end }}
}
return {{ $flag.ContextDefault }}
}
{{ end }}

@ -10,13 +10,13 @@ import (
// BoolFlag is a flag with type bool
type BoolFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Destination *bool
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Destination *bool
}
// String returns a readable representation of this value
@ -64,13 +64,13 @@ func lookupBool(name string, set *flag.FlagSet) bool {
// BoolTFlag is a flag with type bool that is true by default
type BoolTFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Destination *bool
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Destination *bool
}
// String returns a readable representation of this value
@ -118,14 +118,14 @@ func lookupBoolT(name string, set *flag.FlagSet) bool {
// DurationFlag is a flag with type time.Duration (see https://golang.org/pkg/time/#ParseDuration)
type DurationFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value time.Duration
Destination *time.Duration
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value time.Duration
Destination *time.Duration
}
// String returns a readable representation of this value
@ -173,14 +173,14 @@ func lookupDuration(name string, set *flag.FlagSet) time.Duration {
// Float64Flag is a flag with type float64
type Float64Flag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value float64
Destination *float64
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value float64
Destination *float64
}
// String returns a readable representation of this value
@ -228,13 +228,13 @@ func lookupFloat64(name string, set *flag.FlagSet) float64 {
// GenericFlag is a flag with type Generic
type GenericFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value Generic
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value Generic
}
// String returns a readable representation of this value
@ -282,14 +282,14 @@ func lookupGeneric(name string, set *flag.FlagSet) interface{} {
// Int64Flag is a flag with type int64
type Int64Flag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value int64
Destination *int64
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value int64
Destination *int64
}
// String returns a readable representation of this value
@ -337,14 +337,14 @@ func lookupInt64(name string, set *flag.FlagSet) int64 {
// IntFlag is a flag with type int
type IntFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value int
Destination *int
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value int
Destination *int
}
// String returns a readable representation of this value
@ -392,13 +392,13 @@ func lookupInt(name string, set *flag.FlagSet) int {
// IntSliceFlag is a flag with type *IntSlice
type IntSliceFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *IntSlice
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *IntSlice
}
// String returns a readable representation of this value
@ -446,13 +446,13 @@ func lookupIntSlice(name string, set *flag.FlagSet) []int {
// Int64SliceFlag is a flag with type *Int64Slice
type Int64SliceFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *Int64Slice
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *Int64Slice
}
// String returns a readable representation of this value
@ -500,14 +500,14 @@ func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
// StringFlag is a flag with type string
type StringFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value string
Destination *string
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value string
Destination *string
}
// String returns a readable representation of this value
@ -555,13 +555,13 @@ func lookupString(name string, set *flag.FlagSet) string {
// StringSliceFlag is a flag with type *StringSlice
type StringSliceFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *StringSlice
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value *StringSlice
}
// String returns a readable representation of this value
@ -609,14 +609,14 @@ func lookupStringSlice(name string, set *flag.FlagSet) []string {
// Uint64Flag is a flag with type uint64
type Uint64Flag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value uint64
Destination *uint64
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value uint64
Destination *uint64
}
// String returns a readable representation of this value
@ -664,14 +664,14 @@ func lookupUint64(name string, set *flag.FlagSet) uint64 {
// UintFlag is a flag with type uint
type UintFlag struct {
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value uint
Destination *uint
Name string
Usage string
EnvVar string
FilePath string
Required bool
Hidden bool
Value uint
Destination *uint
}
// String returns a readable representation of this value

Loading…
Cancel
Save