Documentation
¶
Index ¶
- type Section
- func (sec *Section) AddValues(name string, values []string)
- func (sec *Section) ClearContent()
- func (sec *Section) Duplicate() *Section
- func (sec *Section) GetSingleValue(name string, default_value string) (string, error)
- func (sec *Section) GetValues(name string) ([]string, error)
- func (sec *Section) GetVariables() []string
- func (secto *Section) Merge(secfrom *Section)
- func (sec *Section) Name() string
- func (sec *Section) SetValues(name string, values []string)
- func (sec *Section) ToString() string
- type VConfig
- func (vc *VConfig) AddSection(sec *Section) error
- func (vc *VConfig) FromString(str string) error
- func (vc *VConfig) GetSections(name string) ([]*Section, error)
- func (vc *VConfig) GetSectionsByName(name string) ([]*Section, error)
- func (vc *VConfig) GetSectionsByVar(secName, varName, varValue string) ([]*Section, error)
- func (vc *VConfig) GetSingleValue(sec_name string, var_name string, default_val string) (string, error)
- func (vcto *VConfig) Merge(vcfrom VConfig)
- func (vc *VConfig) NewSection(name string) *Section
- func (vc *VConfig) ToFile(fname string) error
- func (vc *VConfig) ToString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
func (*Section) ClearContent ¶
func (sec *Section) ClearContent()
clears content of section keeping name unchanged
func (*Section) GetSingleValue ¶
func (*Section) GetVariables ¶
returns list of variables from section
type VConfig ¶
type VConfig []*Section
func (*VConfig) AddSection ¶
Adds stand-alone section to existing VConfig
func (*VConfig) FromString ¶
Loads data to VConfig from string
func (*VConfig) GetSections ¶
return section(s) based on its name
func (*VConfig) GetSectionsByName ¶
Wrapper for GetSections()
func (*VConfig) GetSectionsByVar ¶
func (*VConfig) GetSingleValue ¶
func (vc *VConfig) GetSingleValue(sec_name string, var_name string, default_val string) (string, error)
Return single value
func (*VConfig) NewSection ¶
Creates new section and adds it to VConfig
Click to show internal directories.
Click to hide internal directories.