Documentation ¶
Overview ¶
Package templateh provides simple functions for using inside templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dict ¶
Dict groups passed values by pair in map[string]interface{}. It requires that length of values is even. Each odd value used as key and should be string. Following after it element (each even) is value for this key and may of any type. Dict("one", v1, "two", v2) => {"one": v1, "two": v2}
func NewEmptySlice ¶
func NewEmptySlice(n int) []struct{}
NewEmptySlice returns new empty slice of integers with length and capacity = n. n should be not less than 0.
func NewRange ¶
NewRange returns slice of integers initialized with specified arithmetic progression. Progression defined by from and step: r[0]=from; r[i+1]=r[i]+step. to defines length (and capacity) of slice: (to-from)/step. If length (as described above) is negative or step is zero then panic will be raised. for (i=from; i<to; i+=step) for positive arguments.
Types ¶
This section is empty.