@@ -113,9 +113,11 @@ func TestCliflag(t *testing.T) {
113113 flagset , name , shorthand , env , usage := randomFlag ()
114114 def , _ := cryptorand .Intn (10 )
115115
116+ //nolint:gosec
116117 cliflag .Uint8VarP (flagset , & ptr , name , shorthand , env , uint8 (def ), usage )
117118 got , err := flagset .GetUint8 (name )
118119 require .NoError (t , err )
120+ //nolint:gosec
119121 require .Equal (t , uint8 (def ), got )
120122 require .Contains (t , flagset .FlagUsages (), usage )
121123 require .Contains (t , flagset .FlagUsages (), fmt .Sprintf ("Consumes $%s" , env ))
@@ -125,12 +127,15 @@ func TestCliflag(t *testing.T) {
125127 var ptr uint8
126128 flagset , name , shorthand , env , usage := randomFlag ()
127129 envValue , _ := cryptorand .Intn (10 )
130+ //nolint:gosec
128131 t .Setenv (env , strconv .FormatUint (uint64 (envValue ), 10 ))
129132 def , _ := cryptorand .Intn (10 )
130133
134+ //nolint:gosec
131135 cliflag .Uint8VarP (flagset , & ptr , name , shorthand , env , uint8 (def ), usage )
132136 got , err := flagset .GetUint8 (name )
133137 require .NoError (t , err )
138+ //nolint:gosec
134139 require .Equal (t , uint8 (envValue ), got )
135140 })
136141
@@ -141,9 +146,11 @@ func TestCliflag(t *testing.T) {
141146 t .Setenv (env , envValue )
142147 def , _ := cryptorand .Intn (10 )
143148
149+ //nolint:gosec
144150 cliflag .Uint8VarP (flagset , & ptr , name , shorthand , env , uint8 (def ), usage )
145151 got , err := flagset .GetUint8 (name )
146152 require .NoError (t , err )
153+ //nolint:gosec
147154 require .Equal (t , uint8 (def ), got )
148155 })
149156
@@ -164,6 +171,7 @@ func TestCliflag(t *testing.T) {
164171 var ptr int
165172 flagset , name , shorthand , env , usage := randomFlag ()
166173 envValue , _ := cryptorand .Intn (10 )
174+ //nolint:gosec
167175 t .Setenv (env , strconv .FormatUint (uint64 (envValue ), 10 ))
168176 def , _ := cryptorand .Intn (10 )
169177
0 commit comments