-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.go
70 lines (48 loc) · 1.2 KB
/
base.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package cli
import (
"fmt"
ucli "github.com/urfave/cli/v2"
)
func init() {
// @TODO Override the default version printer.
ucli.VersionPrinter = func(c *Context) {
_, _ = fmt.Fprintf(c.App.Writer, "v%s\n", c.App.Version)
}
}
// Context ...
type Context = ucli.Context
// Command ...
type Command = ucli.Command
// Action ...
type Action = func(*Context) error
// type Action = ucli.ActionFunc
// Flag ...
type Flag = ucli.Flag
// StringFlag ...
type StringFlag = ucli.StringFlag
// Int64Flag ...
type Int64Flag = ucli.Int64Flag
// Float64Flag ...
type Float64Flag = ucli.Float64Flag
// IntFlag ...
type IntFlag = ucli.IntFlag
// BoolFlag ...
type BoolFlag = ucli.BoolFlag
// StringSliceFlag ...
type StringSliceFlag = ucli.StringSliceFlag
// IntSliceFlag ...
type IntSliceFlag = ucli.IntSliceFlag
// Int64SliceFlag ...
type Int64SliceFlag = ucli.Int64SliceFlag
// Float64SliceFlag ...
type Float64SliceFlag = ucli.Float64SliceFlag
// PathFlag ...
type PathFlag = ucli.PathFlag
// UintFlag ...
type UintFlag = ucli.UintFlag
// Uint64Flag ...
type Uint64Flag = ucli.Uint64Flag
// UintSliceFlag ...
type UintSliceFlag = ucli.UintSliceFlag
// Uint64SliceFlag ...
type Uint64SliceFlag = ucli.Uint64SliceFlag