variables

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Variable

type Variable struct {
	// contains filtered or unexported fields
}

func NewFromEnvironment

func NewFromEnvironment(name string) *Variable

func NewVariable

func NewVariable(name, value string) *Variable

NewVariable creates new variable with given name and value

func (*Variable) Perform

func (v *Variable) Perform(str string) string

perform replaces variable in str to its value and returns result string

type Variables

type Variables struct {
	// contains filtered or unexported fields
}

func FromResponse

func FromResponse(varsToSet map[string]string, body string, isJson bool) (vars *Variables, err error)

func New

func New() *Variables

func (*Variables) Add

func (vs *Variables) Add(v *Variable) *Variables

func (*Variables) Apply

func (*Variables) Len

func (vs *Variables) Len() int

func (*Variables) Load

func (vs *Variables) Load(variables map[string]string)

Load adds new variables and replaces values of existing

func (*Variables) Merge

func (vs *Variables) Merge(vars *Variables)

Merge adds given variables to set or overrides existed

func (*Variables) Set

func (vs *Variables) Set(name, value string)

Load adds new variables and replaces values of existing

Jump to

Keyboard shortcuts

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