formatting

package
v0.0.0-...-8a10bf9 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(fstr string) (parts []fmtPart)

Types

type Formatter

type Formatter interface {
	Expand(NamedArgs) string
}

type GoFmt

type GoFmt struct{}

func (*GoFmt) Sprintf

func (f *GoFmt) Sprintf(fstr string, args NamedArgs) string

Sprintf support named format

type NamedArgs

type NamedArgs map[string]interface{}

type RustLikeFmt

type RustLikeFmt []fmtPart

func NewFromString

func NewFromString(v string) RustLikeFmt

func (RustLikeFmt) Expand

func (f RustLikeFmt) Expand(args NamedArgs) string

func (*RustLikeFmt) UnmarshalYAML

func (f *RustLikeFmt) UnmarshalYAML(node *yaml.Node) error

Jump to

Keyboard shortcuts

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