funcs

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: BSD-3-Clause Imports: 10 Imported by: 1

Documentation

Overview

Package funcs provides default functions to include with templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v1.4.0

func Add(i int, offset int) int

Add returns the value of 'i' plus 'offset'.

func FormatStringTime added in v1.8.0

func FormatStringTime(strtime string, input_format string, output_format string) string

func FormatUnixTime added in v1.9.0

func FormatUnixTime(ts int64, output_format string) string

func GjsonGet added in v1.9.0

func GjsonGet(body string, path string) interface{}

func IsAvailable

func IsAvailable(name string, data interface{}) bool

IsAvailable return a boolean value indicating whether 'name' is a named property of 'data'.

func IsEven added in v1.7.0

func IsEven(i int) bool

func IsOdd added in v1.7.0

func IsOdd(i int) bool

func JoinPath added in v1.5.0

func JoinPath(prefix string, path string) string

JoinPath returns the value of 'prefix' prepended to 'path'.

func Mod added in v1.7.0

func Mod(x float64, y float64) float64

func QRCodeB64 added in v1.6.0

func QRCodeB64(uri string) string

Encodes 'uri' as a QR code and returns it as base-64-encoded string.

func QRCodeDataURI added in v1.6.0

func QRCodeDataURI(uri string) string

Encodes 'uri' as a QR code and returns it as base-64-encoded data URI.

func StringHasPrefix added in v1.10.0

func StringHasPrefix(input string, prefix string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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