package format

import "golang.org/x/text/internal/format"

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.

Index

Types

type Formatter

type Formatter interface {
	Format(state State, verb rune)
}

Formatter is analogous to fmt.Formatter.

type State

type State interface {
	fmt.State

	// Language reports the requested language in which to render a message.
	Language() language.Tag
}

State represents the printer state passed to custom formatters. It provides access to the fmt.State interface and the sentence and language-related context.

Source Files

format.go

Version
v0.1.0
Published
Sep 14, 2017
Platform
darwin/amd64
Imports
2 packages
Last checked
1 month ago

Tools for package owners.