fmt

package
v0.0.0-...-538acb4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

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

Namespace provides template functions for the "fmt" namespace.

func New

func New() *Namespace

New returns a new instance of the fmt-namespaced template functions.

func (*Namespace) Errorf

func (ns *Namespace) Errorf(format string, args ...any) string

Errorf formats args according to a format specifier and logs an ERROR. It returns an empty string.

func (*Namespace) Erroridf

func (ns *Namespace) Erroridf(id, format string, args ...any) string

Erroridf formats args according to a format specifier and logs an ERROR and an information text that the error with the given id can be suppressed in config. It returns an empty string.

func (*Namespace) Errormf

func (ns *Namespace) Errormf(m any, format string, args ...any) string

Errormf is experimental and subject to change at any time.

func (*Namespace) Print

func (ns *Namespace) Print(args ...any) string

Print returns a string representation of args.

func (*Namespace) Printf

func (ns *Namespace) Printf(format string, args ...any) string

Printf returns string representation of args formatted with the layout in format.

func (*Namespace) Println

func (ns *Namespace) Println(args ...any) string

Println returns string representation of args ending with a newline.

func (*Namespace) Warnf

func (ns *Namespace) Warnf(format string, args ...any) string

Warnf formats args according to a format specifier and logs a WARNING. It returns an empty string.

func (*Namespace) Warnidf

func (ns *Namespace) Warnidf(id, format string, args ...any) string

Warnidf formats args according to a format specifier and logs an WARNING and an information text that the warning with the given id can be suppressed in config. It returns an empty string.

func (*Namespace) Warnmf

func (ns *Namespace) Warnmf(m any, format string, args ...any) string

Warnmf is experimental and subject to change at any time.

Jump to

Keyboard shortcuts

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