Help us shape the future of Go! Take the 2026 Go Developer Survey

helper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MPL-2.0 Imports: 5 Imported by: 5

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, flagVars *map[string]interface{}) 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]interface{}

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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