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
259 B

4 years ago
package value
4 years ago
import "gitoa.ru/go-4devs/console/input/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
}