package cast

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

Index

Types

type Namespace

type Namespace struct {
}

Namespace provides template functions for the "cast" namespace.

func New

func New() *Namespace

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

func (*Namespace) ToInt

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

ToInt converts the given value to an int.

func (*Namespace) ToString

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

ToString converts the given value to a string.

Source Files

cast.go docshelper.go init.go

Version
v0.22.1
Published
Jun 13, 2017
Platform
windows/amd64
Imports
5 packages
Last checked
10 minutes ago

Tools for package owners.