File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ require (
13
13
github.com/onsi/gomega v1.8.1
14
14
github.com/prometheus/client_golang v1.0.0
15
15
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
16
- github.com/spf13/pflag v1.0.5
17
16
go.uber.org/zap v1.10.0
18
17
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
19
18
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 // indirect
Original file line number Diff line number Diff line change @@ -23,11 +23,13 @@ import (
23
23
"strconv"
24
24
"strings"
25
25
26
- "github.com/spf13/pflag"
27
26
"go.uber.org/zap"
28
27
"go.uber.org/zap/zapcore"
29
28
)
30
29
30
+ // each of these flags also should implement the flag.Value, as well
31
+ // as pflag.Value for convinience.
32
+
31
33
var levelStrings = map [string ]zapcore.Level {
32
34
"debug" : zap .DebugLevel ,
33
35
"-1" : zap .DebugLevel ,
@@ -46,8 +48,6 @@ type encoderFlag struct {
46
48
value string
47
49
}
48
50
49
- var _ pflag.Value = & encoderFlag {}
50
-
51
51
func (ev * encoderFlag ) String () string {
52
52
return ev .value
53
53
}
@@ -85,8 +85,6 @@ type levelFlag struct {
85
85
value string
86
86
}
87
87
88
- var _ pflag.Value = & levelFlag {}
89
-
90
88
func (ev * levelFlag ) Set (flagValue string ) error {
91
89
level , validLevel := levelStrings [strings .ToLower (flagValue )]
92
90
if ! validLevel {
@@ -119,8 +117,6 @@ type stackTraceFlag struct {
119
117
value string
120
118
}
121
119
122
- var _ pflag.Value = & stackTraceFlag {}
123
-
124
120
func (ev * stackTraceFlag ) Set (flagValue string ) error {
125
121
level , validLevel := levelStrings [strings .ToLower (flagValue )]
126
122
if ! validLevel {
You can’t perform that action at this time.
0 commit comments