Documentation ¶
Overview ¶
Package configtmpl provides template functions for ue in config source templates.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Default ¶
Default returns the provided def value if v is either nil or the zero value for its type.
Example ¶
def := "good bye" v := "hello world" fmt.Println(Default(def, v))
Output: hello world
Example (Nil) ¶
fmt.Println(Default("WORLD", nil))
Output: WORLD
Example (Zero) ¶
var v int fmt.Println(Default(10, v))
Output: 10
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.