Documentation
¶
Index ¶
- func Capitalize(s string) string
- func Check(err error, msg string, args ...interface{})
- func Contains(slice []string, s string) bool
- func CreateIfNotExist(docpath, content string) (bool, error)
- func Eout(err error, msg string, args ...interface{}) error
- func GetThreadSlug(threadid int, title string, threadLen int) string
- func GetURLPortion(req *http.Request, index int) (int, bool)
- func Hex2Base64(s string) (string, error)
- func LoadFile(key, docpath, defaultContent string) ([]byte, error)
- func Markup(md string) template.HTML
- func ReadConfig(confpath string) types.Config
- func RelativeTime(t time.Time) string
- func SanitizeStringStrict(s string) string
- func SanitizeURL(input string) string
- func VerificationPrefix(name string) string
- type ErrorDescriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
func CreateIfNotExist ¶
func Eout ¶
format all errors consistently, and provide context for the error using the string `msg`
func GetURLPortion ¶
returns an id from a url path, and a boolean. the boolean is true if we're returning what we expect; false if the operation failed
func Hex2Base64 ¶
func ReadConfig ¶
func RelativeTime ¶
func SanitizeStringStrict ¶
func SanitizeURL ¶
make a string be suitable for use as part of a url
func VerificationPrefix ¶
Types ¶
type ErrorDescriber ¶
type ErrorDescriber struct {
// contains filtered or unexported fields
}
func Describe ¶
func Describe(environ string) ErrorDescriber
parametrize Eout/Check such that error messages contain a defined context/environ
func (ErrorDescriber) Check ¶
func (ed ErrorDescriber) Check(err error, msg string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.