format

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL