template

package
v0.0.0-...-418145e Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SourceFuncs is a map of all top-level functions that generate
	// sockaddr data types.
	SourceFuncs template.FuncMap

	// SortFuncs is a map of all functions used in sorting
	SortFuncs template.FuncMap

	// FilterFuncs is a map of all functions used in sorting
	FilterFuncs template.FuncMap

	// HelperFuncs is a map of all functions used in sorting
	HelperFuncs template.FuncMap
)

Functions

func Attr

func Attr(selectorName string, ifAddrsRaw interface{}) (string, error)

Attr returns the attribute from the ifAddrRaw argument. If the argument is an IfAddrs, only the first element will be evaluated for resolution.

func Parse

func Parse(input string) (string, error)

Parse parses input as template input using the addresses available on the host, then returns the string output if there are no errors.

func ParseIfAddrs

func ParseIfAddrs(input string, ifAddrs sockaddr.IfAddrs) (string, error)

ParseIfAddrs parses input as template input using the IfAddrs inputs, then returns the string output if there are no errors.

func ParseIfAddrsTemplate

func ParseIfAddrsTemplate(input string, ifAddrs sockaddr.IfAddrs, tmplIn *template.Template) (string, error)

ParseIfAddrsTemplate parses input as template input using the IfAddrs inputs, then returns the string output if there are no errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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