Documentation ¶
Index ¶
- func CutRight(s, sep string) (before, after string, found bool)
- func SmartJoin(elems ...string) string
- func SplitRequest(parts []string) (command, condition []string)
- func StringExtractComment(s string) string
- func StringSplitIgnoreEmpty(s string, separators ...rune) []string
- func StringSplitWithCommentIgnoreEmpty(s string) (data []string, comment string)
- type Expression
- type ParserData
- type ReturnResultLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CutRight ¶
CutRight slices string around the last occurrence of sep returning the text before and after sep. The found result reports whether sep appears in s. If sep does not appear in s, cut returns s, "", false.
func SmartJoin ¶
SmartJoin is similar to strings.Join except it skips empty strings and the separator is always a white space. Useful for formatting configuration stanzas with only 1 memory allocation.
func SplitRequest ¶
SplitRequest searches for "if" or "unless" and returns result
func StringExtractComment ¶
StringExtractComment checks if comment is added
func StringSplitIgnoreEmpty ¶
StringSplitIgnoreEmpty while spliting, removes empty items
func StringSplitWithCommentIgnoreEmpty ¶
StringSplitWithCommentIgnoreEmpty while splitting, removes empty items, if we have comment, separate it
Types ¶
type Expression ¶
type Expression struct {
Expr []string
}
Expression is standard HAProxy expression formed by a sample-fetch followed by some converters.
func (*Expression) Parse ¶
func (e *Expression) Parse(expression []string) error
func (*Expression) String ¶
func (e *Expression) String() string
type ParserData ¶
type ParserData interface{}