vars

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vars

type Vars map[string]string

Vars represents a set of known variables to replace in a given command

func (*Vars) Process

func (v *Vars) Process(template string) string

Process takes a template string and replaces all instances of known variabless stored in the Vars set with the known values. Any variables not in the Vals set will be ignored.

func (*Vars) Set

func (v *Vars) Set(key, value string)

Set takes a key value pair and writes it to the Vals set.

Jump to

Keyboard shortcuts

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