Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultPrefix is the default prefix for format strings. DefaultPrefix rune = '%' )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a builder for format strings.
func (Builder) Build ¶
Build builds a new format function.
Returns:
- FormatFn: The new format function. Never returns nil.
type FormatFn ¶
FormatFn is the type for a format function.
Parameters:
- format: The format string.
- data: The data to format.
Returns:
- string: The formatted string.
- error: An error if the format could not be formatted.
type Formatter ¶
type Formatter interface { // Format formats the data using the format string. // // Parameters: // - format: The format string. // // Returns: // - string: The formatted string. // - error: An error if the format could not be formatted. Format(verb string) (string, error) }
Formatter is the interface for a formatter.
Click to show internal directories.
Click to hide internal directories.