urfave-cli/altsrc/input_source_context.go
Edelweiss-Snow 47d325e64f Feature:(issue_1550):Add support Int64Slice by read toml config file
Feature:(issue_1550):add test flag test function
2022-10-31 10:54:49 +08:00

29 lines
722 B
Go

package altsrc
import (
"time"
"github.com/urfave/cli/v2"
)
// InputSourceContext is an interface used to allow
// other input sources to be implemented as needed.
//
// Source returns an identifier for the input source. In case of file source
// it should return path to the file.
type InputSourceContext interface {
Source() string
Int(name string) (int, error)
Duration(name string) (time.Duration, error)
Float64(name string) (float64, error)
String(name string) (string, error)
StringSlice(name string) ([]string, error)
IntSlice(name string) ([]int, error)
Int64Slice(name string) ([]int64, error)
Generic(name string) (cli.Generic, error)
Bool(name string) (bool, error)
isSet(name string) bool
}