Documentation
¶
Index ¶
- Variables
- type ErrEmptyValue
- type ErrValueType
- type LstParser
- type Parser
- func (p *Parser) AddAny(key string, value []*Token, isClosed ...bool)
- func (p *Parser) DelKey(key string)
- func (p *Parser) GetAny(key string) *TokenValue
- func (p *Parser) GetFloat(key string) (float64, error)
- func (p *Parser) GetInt(key string) (int, error)
- func (p *Parser) GetInts(key string) ([]int, error)
- func (p *Parser) GetString(key string) (string, error)
- func (p *Parser) GetStrings(key string) ([]string, error)
- func (p *Parser) Render() string
- func (p *Parser) SetAny(key string, value []*Token, isClosed ...bool)
- func (p *Parser) SetFloat(key string, value float64, isClosed ...bool)
- func (p *Parser) SetInt(key string, value int, isClosed ...bool)
- func (p *Parser) SetInts(key string, value []int, isClosed ...bool)
- func (p *Parser) SetString(key, value string, isClosed ...bool)
- func (p *Parser) SetStrings(key string, value []string, isClosed ...bool)
- type Token
- func (t *Token) Clear()
- func (t *Token) Copy() *Token
- func (t *Token) GetFloat() float64
- func (t *Token) GetInt() int
- func (t *Token) IsCloseKey() bool
- func (t *Token) IsCloseKeyBy(key string) bool
- func (t *Token) IsDelimiter() bool
- func (t *Token) IsFloat() bool
- func (t *Token) IsInt() bool
- func (t *Token) IsKey() bool
- func (t *Token) IsString() bool
- func (t *Token) RawContent() string
- func (t *Token) Render() string
- func (t *Token) String() string
- func (t *Token) Type() TokenType
- type TokenType
- type TokenValue
- func (tv *TokenValue) GetCleanTokens() []*Token
- func (tv *TokenValue) GetFloat() (float64, error)
- func (tv *TokenValue) GetFloats() ([]float64, error)
- func (tv *TokenValue) GetFull() []*Token
- func (tv *TokenValue) GetInt() (int, error)
- func (tv *TokenValue) GetInts() ([]int, error)
- func (tv *TokenValue) GetString() (string, error)
- func (tv *TokenValue) GetStrings() ([]string, error)
- func (tv *TokenValue) GetSub(key string) *TokenValue
- func (tv *TokenValue) ReplaceValue(tokens []*Token)
- func (tv *TokenValue) SetSub(key string, values []*Token, isClosed ...bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var DelimiterChars = []string{"\t", "\n", " ", "\r"}
Functions ¶
This section is empty.
Types ¶
type ErrEmptyValue ¶
type ErrEmptyValue struct{}
func (*ErrEmptyValue) Error ¶
func (e *ErrEmptyValue) Error() string
type ErrValueType ¶
type ErrValueType struct{}
func (*ErrValueType) Error ¶
func (e *ErrValueType) Error() string
type LstParser ¶
type LstParser struct { *Parser // contains filtered or unexported fields }
func NewLstParser ¶
func (*LstParser) GetPathMap ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) GetAny ¶
func (p *Parser) GetAny(key string) *TokenValue
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func GenTokenList ¶
func NewDelimiterToken ¶
func NewRawContentToken ¶ added in v1.0.4
func (*Token) IsCloseKey ¶
func (*Token) IsCloseKeyBy ¶
func (*Token) IsDelimiter ¶
func (*Token) RawContent ¶
type TokenValue ¶
type TokenValue struct {
// contains filtered or unexported fields
}
func NewTokenValue ¶
func NewTokenValue(tokens []*Token) *TokenValue
func (*TokenValue) GetCleanTokens ¶
func (tv *TokenValue) GetCleanTokens() []*Token
func (*TokenValue) GetFloat ¶ added in v1.0.2
func (tv *TokenValue) GetFloat() (float64, error)
func (*TokenValue) GetFloats ¶ added in v1.0.2
func (tv *TokenValue) GetFloats() ([]float64, error)
func (*TokenValue) GetFull ¶
func (tv *TokenValue) GetFull() []*Token
func (*TokenValue) GetInt ¶
func (tv *TokenValue) GetInt() (int, error)
func (*TokenValue) GetInts ¶
func (tv *TokenValue) GetInts() ([]int, error)
func (*TokenValue) GetString ¶
func (tv *TokenValue) GetString() (string, error)
func (*TokenValue) GetStrings ¶
func (tv *TokenValue) GetStrings() ([]string, error)
func (*TokenValue) GetSub ¶
func (tv *TokenValue) GetSub(key string) *TokenValue
func (*TokenValue) ReplaceValue ¶
func (tv *TokenValue) ReplaceValue(tokens []*Token)
Click to show internal directories.
Click to hide internal directories.