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.

22 lines
265 B

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