Documentation ¶
Index ¶
- Variables
- func Array2DEquals(a [][]string, b [][]string) bool
- func ArrayEquals(a []string, b []string) bool
- func ArrayRemoveDuplicates(s *[]string)
- func ArrayToString(s []string) string
- func EscapeAssertion(s string) string
- func IPMatch(ip1 string, ip2 string) bool
- func IPMatchFunc(args ...interface{}) (interface{}, error)
- func KeyMatch(key1 string, key2 string) bool
- func KeyMatch2(key1 string, key2 string) bool
- func KeyMatch2Func(args ...interface{}) (interface{}, error)
- func KeyMatchFunc(args ...interface{}) (interface{}, error)
- func LogPrint(v ...interface{})
- func LogPrintf(format string, v ...interface{})
- func ParamsToString(s ...string) string
- func RegexMatch(key1 string, key2 string) bool
- func RegexMatchFunc(args ...interface{}) (interface{}, error)
- func RemoveComments(s string) string
- func SetEquals(a []string, b []string) bool
Constants ¶
This section is empty.
Variables ¶
var EnableLog = true
EnableLog controls whether to print log to console.
Functions ¶
func Array2DEquals ¶
Array2DEquals determines whether two 2-dimensional string arrays are identical.
func ArrayEquals ¶
ArrayEquals determines whether two string arrays are identical.
func ArrayRemoveDuplicates ¶
func ArrayRemoveDuplicates(s *[]string)
ArrayRemoveDuplicates removes any duplicated elements in a string array.
func ArrayToString ¶
ArrayToString gets a printable string for a string array.
func EscapeAssertion ¶
EscapeAssertion escapes the dots in the assertion, because the expression evaluation doesn't support such variable names.
func IPMatch ¶ added in v0.4.0
IPMatch determines whether IP address ip1 matches the pattern of IP address ip2, ip2 can be an IP address or a CIDR pattern. For example, "192.168.2.123" matches "192.168.2.0/24"
func IPMatchFunc ¶ added in v0.4.0
func IPMatchFunc(args ...interface{}) (interface{}, error)
IPMatchFunc is the wrapper for IPMatch.
func KeyMatch ¶
KeyMatch determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *. For example, "/foo/bar" matches "/foo/*"
func KeyMatch2 ¶ added in v0.4.0
KeyMatch2 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *. For example, "/foo/bar" matches "/foo/*", "/resource1" matches "/:resource"
func KeyMatch2Func ¶ added in v0.4.0
func KeyMatch2Func(args ...interface{}) (interface{}, error)
KeyMatch2Func is the wrapper for KeyMatch2.
func KeyMatchFunc ¶
func KeyMatchFunc(args ...interface{}) (interface{}, error)
KeyMatchFunc is the wrapper for KeyMatch.
func LogPrintf ¶ added in v0.6.0
func LogPrintf(format string, v ...interface{})
LogPrintf prints the log with the format.
func ParamsToString ¶ added in v0.6.0
ParamsToString gets a printable string for variable number of parameters.
func RegexMatch ¶ added in v0.0.4
RegexMatch determines whether key1 matches the pattern of key2 in regular expression.
func RegexMatchFunc ¶ added in v0.0.4
func RegexMatchFunc(args ...interface{}) (interface{}, error)
RegexMatchFunc is the wrapper for RegexMatch.
func RemoveComments ¶ added in v0.1.0
RemoveComments removes the comments starting with # in the text.
Types ¶
This section is empty.