template

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplateFunctions = map[string]any{
	"contains":  strings.Contains,
	"hasPrefix": strings.HasPrefix,
	"hasSuffix": strings.HasSuffix,
	"splitHostPort": func(s string) (map[string]string, error) {
		host, port, err := net.SplitHostPort(s)
		if err != nil {
			return nil, err
		}
		return map[string]string{"host": host, "port": port}, nil
	},
}

Functions

func ParseTemplateForMatch

func ParseTemplateForMatch(tpl string, matchinfo *matchservice.MatchInfo) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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