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

package cast

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

Index

Package Files

cast.go docshelper.go init.go

type Namespace Uses

type Namespace struct {
}

Namespace provides template functions for the "cast" namespace.

func New Uses

func New() *Namespace

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

func (*Namespace) ToFloat Uses

func (ns *Namespace) ToFloat(v interface{}) (float64, error)

ToFloat converts the given value to a float.

func (*Namespace) ToInt Uses

func (ns *Namespace) ToInt(v interface{}) (int, error)

ToInt converts the given value to an int.

func (*Namespace) ToString Uses

func (ns *Namespace) ToString(v interface{}) (string, error)

ToString converts the given value to a string.

Package cast imports 6 packages (graph) and is imported by 6 packages. Updated 2017-11-20. Refresh now. Tools for package owners.