You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
265 B

package value
import "gitoa.ru/go-4devs/console/input/value/flag"
type Any struct {
empty
Val []interface{}
Flag flag.Flag
}
func (a *Any) Any() interface{} {
if a.Flag.IsArray() {
return a.Val
}
if len(a.Val) > 0 {
return a.Val[0]
}
return nil
}