util

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Values

type Values map[string]string

Values represents string mappings for go variables

func (Values) Append

func (v Values) Append(add map[string]string)

Append overrides the current map with a new set of values

func (Values) Cascade

func (v Values) Cascade(name, field, current string) string

Cascade returns the first non empty value

func (Values) Duplicate

func (v Values) Duplicate() Values

Duplicate copies values into a new map

func (Values) FromBytes

func (v Values) FromBytes(data []byte) error

FromBytes reads more key:value mappings from a byte slice

func (Values) FromFile

func (v Values) FromFile(fileName string) error

FromFile reads more key:value mappings from a file

func (Values) FromTemplate

func (v Values) FromTemplate(fileName string, tpl func(string, Values) ([]byte, error)) error

FromTemplate reads more key:value mappings from a templated file

func (Values) ToSlice

func (v Values) ToSlice() []string

ToSlice converts key:value to key=value

Jump to

Keyboard shortcuts

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