Documentation ¶
Overview ¶
Package util contains various general utility functions used throughout the project.
Index ¶
- func CloneBytes(b []byte) []byte
- func ConcatStrings(s ...string) string
- func HashBuffer(buf []byte) string
- func Parallel(fns ...func() error) error
- func SplitPunctuation(word []byte) (leading byte, mid []byte, trailing byte)
- func SplitPunctuationString(word string) (leading byte, mid string, trailing byte)
- func Waterfall(fns ...func() error) (err error)
- func WrapError(text string, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConcatStrings ¶
ConcatStrings efficiently concatenates strings with only one extra allocation
func HashBuffer ¶
HashBuffer computes a base64 MD5 hash from a buffer
func SplitPunctuation ¶
SplitPunctuation splits off one byte of leading and trailing punctuation, if any, and returns the 3 split parts. If there is no edge punctuation, the respective byte = 0.
func SplitPunctuationString ¶
SplitPunctuationString splits off one byte of leading and trailing punctuation, if any, and returns the 3 split parts. If there is no edge punctuation, the respective byte = 0.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.