github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/cli/altsrc/input_source_context.go (about) 1 package altsrc 2 3 import ( 4 "time" 5 6 "github.com/insionng/yougam/libraries/cli" 7 ) 8 9 // InputSourceContext is an interface used to allow 10 // other input sources to be implemented as needed. 11 type InputSourceContext interface { 12 Int(name string) (int, error) 13 Duration(name string) (time.Duration, error) 14 Float64(name string) (float64, error) 15 String(name string) (string, error) 16 StringSlice(name string) ([]string, error) 17 IntSlice(name string) ([]int, error) 18 Generic(name string) (cli.Generic, error) 19 Bool(name string) (bool, error) 20 BoolT(name string) (bool, error) 21 }