Documentation
¶
Overview ¶
Package formatter implements formatters and helper types for err2. See more information from err2.SetFormatter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Decamel = &Formatter{DoFmt: str.Decamel}
Decamel is preimplemented and default formatter to produce human readable error strings from function names.
func CopyFile(..) -> "copy file: file not exists"
^-------^ -> generated from 'func CopyFile'
View Source
var Noop = &Formatter{DoFmt: func(i string) string { return i }}
Noop is preimplemented formatter that does nothing to function name.
func CopyFile(..) -> "CopyFile: file not exists"
^------^ -> function name as it is: CopyFile
Functions ¶
This section is empty.
Types ¶
type DoFmt ¶
DoFmt is a helper function type which allows reuse Formatter struct for the implementations.
Click to show internal directories.
Click to hide internal directories.