util

package
v0.0.0-...-7e76064 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Environment = readEnvironment()

Functions

func DefaultConfigLocations

func DefaultConfigLocations(fileName string) []string

func FileExists

func FileExists(filename string) bool

func FindExistingFile

func FindExistingFile(filenames []string) string

func ProcessAllTemplates

func ProcessAllTemplates(templates, input interface{}) (interface{}, error)

func ProcessTemplate

func ProcessTemplate(tpl string, data interface{}) (string, error)

func ReadConfiguration

func ReadConfiguration(fileName, environmentKey string) (*[]byte, error)

Types

type Empty

type Empty struct{}

type Env

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

func (*Env) Map

func (env *Env) Map() *map[string]string

func (*Env) Value

func (e *Env) Value(k string) *Value

type String

type String map[string]Empty

sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption.

func NewSet

func NewSet(items ...string) String

NewSet creates a String set from a list of values.

func (String) Delete

func (s String) Delete(items ...string) String

Delete removes all items from the set.

func (String) Has

func (s String) Has(item string) bool

Has returns true if and only if item is contained in the set.

func (String) Insert

func (s String) Insert(items ...string) String

Insert adds items to the set.

func (String) Len

func (s String) Len() int

Len returns the size of the set.

func (String) List

func (s String) List() []string

List returns the contents as a sorted string slice.

type Value

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

func (*Value) Base64

func (v *Value) Base64() ([]byte, error)

func (*Value) Int

func (v *Value) Int() (int, error)

func (*Value) String

func (v *Value) String() string

func (*Value) Update

func (v *Value) Update(i interface{})

Jump to

Keyboard shortcuts

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