Documentation ¶
Overview ¶
Okay we need to create syntax. To augment currently possible stuff
Index ¶
- Constants
- Variables
- func InitRegexExpression(regex **regexp.Regexp, expression string)
- type INIFile
- type Param
- type Section
- func (section *Section) AddParam(key string, param *Param)
- func (section *Section) AddParamToStart(key string, param *Param)
- func (section *Section) GetParamBool(key string, optional bool, default_value bool) bool
- func (section *Section) GetParamInt(key string, optional bool) int
- func (section *Section) GetParamNumber(key string, optional bool) ValueNumber
- func (section *Section) GetParamStr(key string, optional bool) string
- func (section *Section) GetParamStrToLower(key string, optional bool) string
- type UniValue
- type ValueBool
- type ValueNumber
- type ValueString
Constants ¶
View Source
const ( OPTIONAL_p = true REQUIRED_p = false )
View Source
const KEY_COMMENT string = "00e0fc91e00300ed" // random hash
Variables ¶
View Source
var CASE_SENSETIVE_KEYS = [...]string{"BGCS_base_run_by", "NavMapScale"}
Functions ¶
func InitRegexExpression ¶ added in v0.51.0
Types ¶
type INIFile ¶
type INIFile struct { File *file.File Comments []string Sections []*Section // denormalization SectionMap map[inireader_types.IniHeader][]*Section }
func (*INIFile) AddSection ¶
func (config *INIFile) AddSection(key inireader_types.IniHeader, section *Section)
type Param ¶
type Param struct { Key string Values []UniValue IsComment bool // if commented out First UniValue // denormalization due to very often being needed }
abc = qwe, 1, 2, 3, 4 abc is key qwe is first value qwe, 1, 2, 3, 4 are values ;abc = qwe, 1, 2, 3 is Comment
type Section ¶
type Section struct { OriginalType inireader_types.IniHeader // with preserved case sesntivity Type inireader_types.IniHeader // to lower case Params []*Param // denormialization of Param list due to being more comfortable ParamMap map[string][]*Param }
[BaseGood] // this is Type abc = 123 // this is Param going into list and hashmap
func (*Section) AddParamToStart ¶
func (*Section) GetParamBool ¶
func (*Section) GetParamNumber ¶
func (section *Section) GetParamNumber(key string, optional bool) ValueNumber
type UniValue ¶
type UniValue interface {
AsString() string
}
func UniParseFloat ¶ added in v0.8.0
func UniParseInt ¶
func UniParseStr ¶
type ValueNumber ¶
func (ValueNumber) AsString ¶
func (v ValueNumber) AsString() string
type ValueString ¶
type ValueString string
func (ValueString) AsString ¶
func (v ValueString) AsString() string
func (ValueString) ToLowerValue ¶
func (v ValueString) ToLowerValue() ValueString
Click to show internal directories.
Click to hide internal directories.