Categorygithub.com/cznic/strutil
modulepackage
0.0.0-20181122101858-275e90344537
Repository: https://github.com/cznic/strutil.git
Documentation: pkg.go.dev

# README

This is a goinstall-able mirror of modified code already published at: http://git.nic.cz/redmine/projects/gostrutil/repository

Online godoc documentation for this package (should be) available at: http://gopkgdoc.appspot.com/pkg/github.com/cznic/strutil

Installation: $ go get github.com/cznic/strutil

# Functions

Base32ExtDecode decodes base32 extended (RFC 4648) text to binary data.
Base32ExtEncode encodes binary data to base32 extended (RFC 4648) encoded text.
Base64Decode decodes base64 text to binary data.
Base64Encode encodes binary data to base64 encoded text.
FlatFormatter returns a newly created Formatter with the same functionality as the one returned by IndentFormatter except it allows a newline in the 'format' string argument of Format to pass through iff indent level is currently zero.
Gopath returns the value of the $GOPATH environment variable or its default value if not set.
Homepath returns the user's home directory path.
ImportPath returns the import path of the caller or an error, if any.
IndentFormatter returns a new Formatter which interprets %i and %u in the Format() format string as indent and undent commands.
JoinFields returns strings in flds joined by sep.
NewDict returns a newly created Dict.
NewGoDict returns a newly created GoDict.
NewGoPool returns a newly created GoPool.
NewPool returns a newly created Pool.
PrettyPrint pretty prints v to w.
PrettyString returns the output of PrettyPrint as a string.
SplitFields splits s, which must be produced by JoinFields using the same sep, into flds.
StrPack returns a new instance of s which is tightly packed in memory.

# Structs

Dict is a string <-> id bijection.
GoDict is a concurrent access safe version of Dict.
GoPool is a concurrent access safe version of Pool.
Pool handles aligning of strings having equal values to the same string instance.

# Interfaces

Formatter is an io.Writer extended by a fmt.Printf like function Format.

# Type aliases

PrettyPrintHooks allow to customize the result of PrettyPrint for types listed in the map value.