@@ -115,13 +115,13 @@ func TooManyArguments(ctx *cli.Context) error {
115115
116116// InsecureArgument returns an error with the given argument requiring the
117117// --insecure flag.
118- func InsecureArgument (ctx * cli.Context , name string ) error {
118+ func InsecureArgument (_ * cli.Context , name string ) error {
119119 return fmt .Errorf ("positional argument <%s> requires the '--insecure' flag" , name )
120120}
121121
122122// FlagValueInsecure returns an error with the given flag and value requiring
123123// the --insecure flag.
124- func FlagValueInsecure (ctx * cli.Context , flag , value string ) error {
124+ func FlagValueInsecure (_ * cli.Context , flag , value string ) error {
125125 return fmt .Errorf ("flag '--%s %s' requires the '--insecure' flag" , flag , value )
126126}
127127
@@ -139,7 +139,7 @@ func InvalidFlagValue(ctx *cli.Context, flag, value, options string) error {
139139// InvalidFlagValueMsg returns an error with the given value being missing or
140140// invalid for the given flag. Optionally it returns an error message to aid
141141// in debugging.
142- func InvalidFlagValueMsg (ctx * cli.Context , flag , value , msg string ) error {
142+ func InvalidFlagValueMsg (_ * cli.Context , flag , value , msg string ) error {
143143 var format string
144144 if value == "" {
145145 format = fmt .Sprintf ("missing value for flag '--%s'" , flag )
@@ -156,19 +156,19 @@ func InvalidFlagValueMsg(ctx *cli.Context, flag, value, msg string) error {
156156
157157// IncompatibleFlag returns an error with the flag being incompatible with the
158158// given value.
159- func IncompatibleFlag (ctx * cli.Context , flag , value string ) error {
159+ func IncompatibleFlag (_ * cli.Context , flag , value string ) error {
160160 return fmt .Errorf ("flag '--%s' is incompatible with '%s'" , flag , value )
161161}
162162
163163// IncompatibleFlagWithFlag returns an error with the flag being incompatible with the
164164// given value.
165- func IncompatibleFlagWithFlag (ctx * cli.Context , flag , withFlag string ) error {
165+ func IncompatibleFlagWithFlag (_ * cli.Context , flag , withFlag string ) error {
166166 return fmt .Errorf ("flag '--%s' is incompatible with '--%s'" , flag , withFlag )
167167}
168168
169169// IncompatibleFlagValue returns an error with the flag being incompatible with the
170170// given value.
171- func IncompatibleFlagValue (ctx * cli.Context , flag , incompatibleWith ,
171+ func IncompatibleFlagValue (_ * cli.Context , flag , incompatibleWith ,
172172 incompatibleWithValue string ) error {
173173 return fmt .Errorf ("flag '--%s' is incompatible with flag '--%s %s'" ,
174174 flag , incompatibleWith , incompatibleWithValue )
@@ -185,7 +185,7 @@ func IncompatibleFlagValues(ctx *cli.Context, flag, value, incompatibleWith,
185185// IncompatibleFlagValueWithFlagValue returns an error with the given value
186186// being missing or invalid for the given flag. Optionally it lists the given
187187// formatted options at the end.
188- func IncompatibleFlagValueWithFlagValue (ctx * cli.Context , flag , value ,
188+ func IncompatibleFlagValueWithFlagValue (_ * cli.Context , flag , value ,
189189 withFlag , withValue , options string ) error {
190190 format := fmt .Sprintf ("flag '--%s %s' is incompatible with flag '--%s %s'" ,
191191 flag , value , withFlag , withValue )
@@ -205,29 +205,29 @@ func RequiredFlag(ctx *cli.Context, flag string) error {
205205}
206206
207207// RequiredWithFlag returns an error with the required flag message with another flag.
208- func RequiredWithFlag (ctx * cli.Context , flag , required string ) error {
208+ func RequiredWithFlag (_ * cli.Context , flag , required string ) error {
209209 return fmt .Errorf ("flag '--%s' requires the '--%s' flag" , flag , required )
210210}
211211
212212// RequiredWithFlagValue returns an error with the required flag message.
213- func RequiredWithFlagValue (ctx * cli.Context , flag , value , required string ) error {
213+ func RequiredWithFlagValue (_ * cli.Context , flag , value , required string ) error {
214214 return fmt .Errorf ("'--%s %s' requires the '--%s' flag" , flag , value , required )
215215}
216216
217217// RequiredWithProvisionerTypeFlag returns an error with the required flag message.
218- func RequiredWithProvisionerTypeFlag (ctx * cli.Context , provisionerType , required string ) error {
218+ func RequiredWithProvisionerTypeFlag (_ * cli.Context , provisionerType , required string ) error {
219219 return fmt .Errorf ("provisioner type '%s' requires the '--%s' flag" , provisionerType , required )
220220}
221221
222222// RequiredInsecureFlag returns an error with the given flag requiring the
223223// insecure flag message.
224- func RequiredInsecureFlag (ctx * cli.Context , flag string ) error {
224+ func RequiredInsecureFlag (_ * cli.Context , flag string ) error {
225225 return fmt .Errorf ("flag '--%s' requires the '--insecure' flag" , flag )
226226}
227227
228228// RequiredSubtleFlag returns an error with the given flag requiring the
229229// subtle flag message..
230- func RequiredSubtleFlag (ctx * cli.Context , flag string ) error {
230+ func RequiredSubtleFlag (_ * cli.Context , flag string ) error {
231231 return fmt .Errorf ("flag '--%s' requires the '--subtle' flag" , flag )
232232}
233233
@@ -239,7 +239,7 @@ func RequiredUnlessInsecureFlag(ctx *cli.Context, flag string) error {
239239
240240// RequiredUnlessFlag returns an error with the required flag message unless
241241// the specified flag is used.
242- func RequiredUnlessFlag (ctx * cli.Context , flag , unlessFlag string ) error {
242+ func RequiredUnlessFlag (_ * cli.Context , flag , unlessFlag string ) error {
243243 return fmt .Errorf ("flag '--%s' is required unless the '--%s' flag is provided" , flag , unlessFlag )
244244}
245245
@@ -250,7 +250,7 @@ func RequiredUnlessSubtleFlag(ctx *cli.Context, flag string) error {
250250}
251251
252252// RequiredOrFlag returns an error with a list of flags being required messages.
253- func RequiredOrFlag (ctx * cli.Context , flags ... string ) error {
253+ func RequiredOrFlag (_ * cli.Context , flags ... string ) error {
254254 params := make ([]string , len (flags ))
255255 for i , flag := range flags {
256256 params [i ] = "--" + flag
@@ -260,7 +260,7 @@ func RequiredOrFlag(ctx *cli.Context, flags ...string) error {
260260
261261// RequiredWithOrFlag returns an error with a list of flags at least one of which
262262// is required in conjunction with the last flag in the list.
263- func RequiredWithOrFlag (ctx * cli.Context , withFlag string , flags ... string ) error {
263+ func RequiredWithOrFlag (_ * cli.Context , withFlag string , flags ... string ) error {
264264 params := make ([]string , len (flags ))
265265 for i := 0 ; i < len (flags ); i ++ {
266266 params [i ] = "--" + flags [i ]
@@ -270,25 +270,25 @@ func RequiredWithOrFlag(ctx *cli.Context, withFlag string, flags ...string) erro
270270
271271// MinSizeFlag returns an error with a greater or equal message message for
272272// the given flag and size.
273- func MinSizeFlag (ctx * cli.Context , flag , size string ) error {
273+ func MinSizeFlag (_ * cli.Context , flag , size string ) error {
274274 return fmt .Errorf ("flag '--%s' must be greater than or equal to %s" , flag , size )
275275}
276276
277277// MinSizeInsecureFlag returns an error with a requiring --insecure flag
278278// message with the given flag an size.
279- func MinSizeInsecureFlag (ctx * cli.Context , flag , size string ) error {
279+ func MinSizeInsecureFlag (_ * cli.Context , flag , size string ) error {
280280 return fmt .Errorf ("flag '--%s' requires at least %s unless '--insecure' flag is provided" , flag , size )
281281}
282282
283283// MutuallyExclusiveFlags returns an error with mutually exclusive message for
284284// the given flags.
285- func MutuallyExclusiveFlags (ctx * cli.Context , flag1 , flag2 string ) error {
285+ func MutuallyExclusiveFlags (_ * cli.Context , flag1 , flag2 string ) error {
286286 return fmt .Errorf ("flag '--%s' and flag '--%s' are mutually exclusive" , flag1 , flag2 )
287287}
288288
289289// UnsupportedFlag returns an error with a message saying that the given flag is
290290// not yet supported.
291- func UnsupportedFlag (ctx * cli.Context , flag string ) error {
291+ func UnsupportedFlag (_ * cli.Context , flag string ) error {
292292 return fmt .Errorf ("flag '--%s' is not yet supported" , flag )
293293}
294294
0 commit comments