cast

package
v0.0.0-...-42d6f5d Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package cast provides template functions for data type conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) ToFloat

func (ns *Namespace) ToFloat(v any) (float64, error)

ToFloat converts v to a float.

func (*Namespace) ToInt

func (ns *Namespace) ToInt(v any) (int, error)

ToInt converts v to an int.

func (*Namespace) ToString

func (ns *Namespace) ToString(v any) (string, error)

ToString converts v to a string.

Jump to

Keyboard shortcuts

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