/
flag-spec.yaml
74 lines (71 loc) · 2.14 KB
/
flag-spec.yaml
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
71
72
73
74
# NOTE: this file is used by the tool defined in
# ./internal/genflags/cmd/genflags/main.go which uses the
# `genflags.Spec` type that maps to this file structure.
flag_types:
bool:
struct_fields:
- { name: Action, type: "func(*Context, bool) error" }
float64:
struct_fields:
- { name: Action, type: "func(*Context, float64) error" }
int64:
struct_fields:
- { name: Action, type: "func(*Context, int64) error" }
int:
struct_fields:
- { name: Action, type: "func(*Context, int) error" }
time.Duration:
struct_fields:
- { name: Action, type: "func(*Context, time.Duration) error" }
uint64:
struct_fields:
- { name: Action, type: "func(*Context, uint64) error" }
uint:
struct_fields:
- { name: Action, type: "func(*Context, uint) error" }
string:
struct_fields:
- { name: TakesFile, type: bool }
- { name: Action, type: "func(*Context, string) error" }
Generic:
struct_fields:
- { name: TakesFile, type: bool }
- { name: Action, type: "func(*Context, interface{}) error" }
Path:
struct_fields:
- { name: TakesFile, type: bool }
- { name: Action, type: "func(*Context, Path) error" }
Float64Slice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- { name: Action, type: "func(*Context, []float64) error" }
Int64Slice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- { name: Action, type: "func(*Context, []int64) error" }
IntSlice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- { name: Action, type: "func(*Context, []int) error" }
StringSlice:
value_pointer: true
skip_interfaces:
- fmt.Stringer
struct_fields:
- { name: TakesFile, type: bool }
- { name: Action, type: "func(*Context, []string) error" }
Timestamp:
value_pointer: true
struct_fields:
- { name: Layout, type: string }
- { name: Action, type: "func(*Context, *time.Time) error" }
# TODO: enable UintSlice
# UintSlice: {}
# TODO: enable Uint64Slice once #1334 lands
# Uint64Slice: {}