package format

Import Path
	golang.org/x/text/internal/format (on go.dev)

Dependency Relation
	imports 4 packages, and imported by 2 packages

Involved Source Files Package format contains types for defining language-specific formatting of values. This package is internal now, but will eventually be exposed after the API settles. parser.go
Package-Level Type Names (total 4)
/* sort by: | */
Formatter is analogous to fmt.Formatter. ( Formatter) Format(state State, verb rune) golang.org/x/text/number.Formatter
A Parser parses a format string. The result from the parse are set in the struct fields. retain current argument number across calls retain arguments across calls. HasIndex bool Minus bool Plus bool For the formats %+v %#v, we set the plusV/sharpV flags and clear the plus/sharp flags since %+v and %#v are in effect different, flagless formats set at the top level. // precision PrecPresent bool reordered records whether the format string used argument reordering. Sharp bool SharpV bool Space bool Status Status Verb rune Width int WidthPresent bool Zero bool ClearFlags reset the parser to default behavior. Reset initializes a parser to scan format strings for the given args. Scan scans the next part of the format string and sets the status to indicate whether it scanned a string literal, substitution or error. SetFormat sets a new format string to parse. It does not reset the argument count. Text returns the part of the format string that was parsed by the last call to Scan. It returns the original substitution clause if the current scan parsed a substitution.
State represents the printer state passed to custom formatters. It provides access to the fmt.State interface and the sentence and language-related context. Flag reports whether the flag c, a character, has been set. Language reports the requested language in which to render a message. Precision returns the value of the precision option and whether it has been set. Width returns the value of the width option and whether it has been set. Write is the function to call to emit formatted output to be printed. State : fmt.State State : github.com/miekg/dns.Writer State : internal/bisect.Writer State : io.Writer func Formatter.Format(state State, verb rune) func golang.org/x/text/number.Formatter.Format(state State, verb rune)
Status indicates the result type of a call to Scan. const StatusBadArgNum const StatusBadPrecSubstitution const StatusBadWidthSubstitution const StatusMissingArg const StatusNoVerb const StatusSubstitution const StatusText
Package-Level Constants (total 7)
const StatusNoVerb Status = 4
const StatusText Status = 0