Documentation ¶
Overview ¶
Converter Helper to parse and prepare options for go-comic-converter.
It use goflag with additional feature:
- Keep original order
- Support section
Index ¶
- type Converter
- func (c *Converter) AddBoolParam(p *bool, name string, value bool, usage string)
- func (c *Converter) AddFloatParam(p *float64, name string, value float64, usage string)
- func (c *Converter) AddIntParam(p *int, name string, value int, usage string)
- func (c *Converter) AddSection(section string)
- func (c *Converter) AddStringParam(p *string, name string, value string, usage string)
- func (c *Converter) Fatal(err error)
- func (c *Converter) InitParse()
- func (c *Converter) LoadConfig() error
- func (c *Converter) Parse()
- func (c *Converter) Stats()
- func (c *Converter) Usage(isString bool, f *flag.Flag) string
- func (c *Converter) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct { Options *options.Options Cmd *flag.FlagSet // contains filtered or unexported fields }
func (*Converter) AddBoolParam ¶
Add a boolean parameter
func (*Converter) AddFloatParam ¶
Add an float parameter
func (*Converter) AddIntParam ¶
Add an integer parameter
func (*Converter) AddSection ¶
Create a new section of config
func (*Converter) AddStringParam ¶
Add a string parameter
func (*Converter) InitParse ¶
func (c *Converter) InitParse()
Initialize the parser with all section and parameter.
func (*Converter) LoadConfig ¶
Load default options (config + default)
Click to show internal directories.
Click to hide internal directories.