fmt

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 38

Documentation

Overview

Package fmt provides template functions for formatting strings.

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(d *deps.Deps) *Namespace

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

func (*Namespace) Errorf added in v0.30.1

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

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

func (*Namespace) Erroridf added in v0.84.0

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

Erroridf formats 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) Print

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

Print returns string representation of the passed arguments.

func (*Namespace) Printf

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

Printf returns a formatted string representation of the passed arguments.

func (*Namespace) Println

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

Println returns string representation of the passed arguments ending with a newline.

func (*Namespace) Warnf added in v0.62.0

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

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

Jump to

Keyboard shortcuts

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