tmpl

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tmpl expands the {placeholder} templates the configuration uses for host names and tunnel definitions.

The syntax is deliberately small: {name} is replaced by the value named "name", {{ and }} write a literal brace, and a placeholder that names nothing is an error rather than an empty string, so a typo in a naming rule is reported instead of producing a host name like ".example.org".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(template string, vars map[string]string) (string, error)

Expand fills the placeholders of a template.

func Names

func Names(vars map[string]string) []string

Names lists the placeholders a variable set offers, in sorted order.

func Prefixed

func Prefixed(prefix string, values map[string]string, into map[string]string) map[string]string

Prefixed copies a map of values under a dotted prefix, so that a domain table becomes {domains.hpc} and the like.

Types

This section is empty.

Jump to

Keyboard shortcuts

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