strfmt

package
v0.0.0-...-9648343 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	// contains filtered or unexported fields
}

A Formatter can format positional-argument templates. Templates can (re)use arguments in arbitrary order.

func MustParse

func MustParse(s string) Formatter

MustParse calls Parse and panics on error.

func Parse

func Parse(s string) (Formatter, error)

Parse creates a reusable formatting template.

func (Formatter) Apply

func (f Formatter) Apply(args []string) string

Apply applies the given arguments to the string template.

func (Formatter) ApplyFragments

func (f Formatter) ApplyFragments(args []string) []ipc.Fragment

Jump to

Keyboard shortcuts

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