Documentation ¶
Index ¶
- func Compile(args CompileArgs, singles ...any) string
- func CompileStrings(args CompileArgs, singles ...string) string
- func GetWriter(eb errors.Block) io.StringWriter
- func MqttMatch(pattern, topic string) bool
- func PutWriter(w io.StringWriter)
- func String(w io.StringWriter) string
- func StringErr(w io.StringWriter) error
- func StringLen(w io.StringWriter) int
- type CompileArgs
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶
func Compile(args CompileArgs, singles ...any) string
Compile all values into a single comma-separated string. Any string values are quoted with quote.
func CompileStrings ¶
func CompileStrings(args CompileArgs, singles ...string) string
CompileStrings compiles all values into a single comma-separated string. Any string values are quoted with quote.
func GetWriter ¶
func GetWriter(eb errors.Block) io.StringWriter
GetWriter removes and answers a new string writer from the global pool.
func MqttMatch ¶
MqttMatch answers true if the topic matches the pattern according to MQTT rules: * Pattern is a slash-separated hierarchy. Wildcard "+" matches a single level in the hierarchy. Wildcard "#" matches all further levels in the hierarchy.
Examples: Pattern a/b matches topic a/b a/# matches a/b, a/c, a/b/c etc a/+/c matches a/b/c, a/c/c, but not a/b, not a/b/c/c, etc.
func String ¶
func String(w io.StringWriter) string
func StringErr ¶
func StringErr(w io.StringWriter) error
func StringLen ¶
func StringLen(w io.StringWriter) int
Types ¶
type Pool ¶
type Pool interface { // Acquire takes a writer out of the pool. Get(errors.Block) io.StringWriter // Release puts a writer in the pool. Put(io.StringWriter) // Close puts all writers back in the master pool. Close() error }
--------------------------------------------------------- Pool interface describes an object that gives and receives ownership of string writers.