fix lint
Some checks failed
build / lint (push) Successful in 46s
build / test (push) Failing after 48s
codeql / analyze (go) (push) Failing after 1m23s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-12-12 11:39:15 +03:00
parent e712519f44
commit ec3ae6b934
2 changed files with 7 additions and 1 deletions

View File

@ -41,8 +41,12 @@ func (c *flagConfig) Options() config.Options {
}
func (c *flagConfig) Init(opts ...options.Option) error {
var err error
for _, o := range opts {
o(&c.opts)
if err = o(&c.opts); err != nil {
return err
}
}
if err := config.DefaultBeforeInit(c.opts.Context, c); err != nil && !c.opts.AllowFail {

View File

@ -325,6 +325,7 @@ func (c *flagConfig) flagFloat64(v reflect.Value, fn, fv, fd string) error {
return nil
}
/*
func (c *flagConfig) flagStringSlice(v reflect.Value, fn, fv, fd string) error {
nv, ok := v.Addr().Interface().(*string)
if !ok {
@ -333,6 +334,7 @@ func (c *flagConfig) flagStringSlice(v reflect.Value, fn, fv, fd string) error {
flag.StringVar(nv, fn, fv, fd)
return nil
}
*/
func getFlagOpts(tf string) (string, string, string) {
var name, desc, def string