Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceExtractor ¶
type ServiceExtractor struct {
// contains filtered or unexported fields
}
ServiceExtractor encapsulate logic of parsing parameters from CLI and config
func NewServiceExtractor ¶
func NewServiceExtractor(flags *flag.FlagSet, config map[string]string) *ServiceExtractor
NewServiceExtractor create new ServiceExtractor
func (*ServiceExtractor) GetBool ¶
func (e *ServiceExtractor) GetBool(param, generalParam string) bool
GetBool parse bool param from CLI and Config in the following order CLI param -> Config param -> CLI generalParam if present -> Config generalParam if present -> CLI default value
func (*ServiceExtractor) GetInt ¶
func (e *ServiceExtractor) GetInt(param, generalParam string) int
GetInt parse int param from CLI and Config in the following order CLI param -> Config param -> CLI generalParam if present -> Config generalParam if present -> CLI default value
func (*ServiceExtractor) GetString ¶
func (e *ServiceExtractor) GetString(param, generalParam string) string
GetString parse string param from CLI and Config in the following order CLI param -> Config param -> CLI generalParam if present -> Config generalParam if present -> CLI default value