stringtemplate

package
Version: v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package stringtemplate implements Python string.Template-like substitution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(v string, subst map[string]string) (string, error)

Resolve resolves substitutions in v using the supplied substitution map, subst.

A substitution can have the form:

$key
${key}

The substitution can also be escaped using a second "$", such as "$$".

If the string includes an erroneous substitution, or if a referenced template variable isn't included in the "substitutions" map, Resolve will return an error.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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