Documentation
¶
Overview ¶
Okay we need to create syntax. To augment currently possible stuff
Index ¶
- Constants
- Variables
- func InitRegexExpression(regex **regexp.Regexp, expression string)
- func NewFailedToReadNumber(input any) error
- type BitsInFloat
- type FailedToReadNumber
- type INIFile
- type Param
- type Section
- func (section *Section) AddParam(key cfg.ParamKey, param *Param)
- func (section *Section) AddParamToStart(key cfg.ParamKey, param *Param)
- func (section *Section) GetParamBool(key_v string, optional bool, default_value bool) bool
- func (section *Section) GetParamInt(key cfg.ParamKey, optional bool) int
- func (section *Section) GetParamNumber(key_v string, optional bool) ValueNumber
- func (section *Section) GetParamStr(key cfg.ParamKey, optional bool) string
- func (section *Section) GetParamStrToLower(key cfg.ParamKey, optional bool) string
- func (s Section) ToString(with_comments WithComments) string
- type UniValue
- type ValueBool
- type ValueNumber
- type ValueString
- type WithComments
Constants ¶
View Source
const ( OPTIONAL_p = true REQUIRED_p = false )
Variables ¶
View Source
var CASE_SENSETIVE_KEYS = [...]string{"BGCS_base_run_by", "NavMapScale"}
View Source
var KEY_COMMENT cfg.ParamKey = cfg.Key("00e0fc91e00300ed") // random hash
Functions ¶
func InitRegexExpression ¶
func NewFailedToReadNumber ¶ added in v1.93.0
Types ¶
type BitsInFloat ¶ added in v1.133.9
type BitsInFloat int8
const ( Float32 BitsInFloat = iota Float64 )
func (BitsInFloat) ToInt ¶ added in v1.133.9
func (b BitsInFloat) ToInt() int
type FailedToReadNumber ¶ added in v1.93.0
type FailedToReadNumber struct {
// contains filtered or unexported fields
}
func (FailedToReadNumber) Error ¶ added in v1.93.0
func (e FailedToReadNumber) Error() string
type INIFile ¶
type INIFile struct {
File *file.File
Comments []string
Sections []*Section
// denormalization
SectionMap map[inireader_types.IniHeader][]*Section
SectionMapByNick map[string]*Section
}
func (*INIFile) AddSection ¶
func (config *INIFile) AddSection(key inireader_types.IniHeader, section *Section)
type Param ¶
type Param struct {
Key cfg.ParamKey
Values []UniValue
IsParamAsComment bool // if special param as comment for autogenerated comments
First UniValue // denormalization due to very often being needed
Comment string
}
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
func (Param) ToString ¶
func (p Param) ToString(with_comments WithComments) string
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[cfg.ParamKey][]*Param
INIFile *INIFile
Comment string
}
[BaseGood] // this is Type abc = 123 // this is Param going into list and hashmap
func (*Section) AddParamToStart ¶
func (*Section) GetParamBool ¶
func (*Section) GetParamInt ¶
func (*Section) GetParamNumber ¶
func (section *Section) GetParamNumber(key_v string, optional bool) ValueNumber
func (*Section) GetParamStr ¶
func (*Section) GetParamStrToLower ¶
func (Section) ToString ¶
func (s Section) ToString(with_comments WithComments) string
type UniValue ¶
type UniValue interface {
AsString() string
}
func UniParseFloat ¶
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
type WithComments ¶
type WithComments bool
Click to show internal directories.
Click to hide internal directories.