helper

package
v0.0.0-...-50ee31f Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultTmplFile

func GetDefaultTmplFile() (templateFile string)

GetDefaultTmplFile checks the current working directory for *.nomad files. If only 1 is found we return the match.

func GetDefaultVarFile

func GetDefaultVarFile() (varFile string)

GetDefaultVarFile checks the current working directory for levant.(yaml|yml|tf) files. The first match is returned.

func VariableMerge

func VariableMerge(fileVars *map[string]interface{}, flagVars *map[string]string) map[string]interface{}

VariableMerge merges the passed file variables with the flag variabes to provide a single set of variables. The flagVars will always prevale over file variables.

Types

type Flag

type Flag map[string]string

Flag is a flag.Value implementation for parsing user variables from the command-line in the format of '-var key=value'.

func (*Flag) Set

func (v *Flag) Set(raw string) error

Set takes a flag variable argument and pulls the correct key and value to create or add to a map.

func (*Flag) String

func (v *Flag) String() string

type FlagStringSlice

type FlagStringSlice []string

FlagStringSlice is a flag.Value implementation for parsing targets from the command line, e.g. -var-file=aa -var-file=bb

func (*FlagStringSlice) Set

func (v *FlagStringSlice) Set(raw string) error

Set is used to append a variable file flag argument to a list of file flag args.

func (*FlagStringSlice) String

func (v *FlagStringSlice) String() string

Jump to

Keyboard shortcuts

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