Sprig Type Conversion

Sprig Type Conversion

atoi

func atoi(str string) int
Convert a string to an integer.

float64

func float64(value interface{}) float64
Convert to a `float64`.

intSprig

func intSprig(value interface{}) int
Convert to an `int` at the system's width.

Aliases

  • int

toDecimal

func toDecimal(octalString interface{}) int64
Convert a unix octal to a 'int64'.