args

package
v0.0.0-...-982e07a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL