hugo: github.com/gohugoio/hugo/tpl/fmt Index | Files

package fmt

import "github.com/gohugoio/hugo/tpl/fmt"

Package fmt provides template functions for formatting strings.

Index

Package Files

fmt.go init.go

type Namespace Uses

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

Namespace provides template functions for the "fmt" namespace.

func New Uses

func New(d *deps.Deps) *Namespace

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

func (*Namespace) Errorf Uses

func (ns *Namespace) Errorf(format string, a ...interface{}) string

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

func (*Namespace) Print Uses

func (ns *Namespace) Print(a ...interface{}) string

Print returns string representation of the passed arguments.

func (*Namespace) Printf Uses

func (ns *Namespace) Printf(format string, a ...interface{}) string

Printf returns a formatted string representation of the passed arguments.

func (*Namespace) Println Uses

func (ns *Namespace) Println(a ...interface{}) string

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

func (*Namespace) Warnf Uses

func (ns *Namespace) Warnf(format string, a ...interface{}) string

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

Package fmt imports 4 packages (graph) and is imported by 44 packages. Updated 2020-09-08. Refresh now. Tools for package owners.