Documentation ¶
Index ¶
- Variables
- func AppendProjectEnvToCmdEnv(envMap map[string]string, envList []string, translationMap map[string]string) []string
- func CleanGoIdentifier(identifier string) string
- func CreateDirIfDoesNotExist(path string) error
- func ExecuteCommand(cmd *exec.Cmd, pathPrefix string, envars []string, shouldPipeStdErr bool) error
- func ExecuteCommandOutput(cmd *exec.Cmd, pathPrefix string, envars []string) string
- func GetCwd() string
- func IndentString(content string, spaces int) string
- func ItemInSlice(slice []string, target string) bool
- func ReflectStructValueIntoMap(resource interface{}, tagName string, paramsToFill map[string]string)
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncMap = template.FuncMap{ "Title": strings.Title, "ToLower": strings.ToLower, "CleanGoIdentifier": CleanGoIdentifier, "GenerateUUID": uuid.New, }
@TODO how can we make these type of helpers extensible?
Functions ¶
func AppendProjectEnvToCmdEnv ¶
func AppendProjectEnvToCmdEnv(envMap map[string]string, envList []string, translationMap map[string]string) []string
AppendProjectEnvToCmdEnv converts a key-value pair map into a slice of `key=value`s allow module definition to use an alternative env-var-name than field while apply
func CleanGoIdentifier ¶
func CreateDirIfDoesNotExist ¶
func ExecuteCommand ¶
func ExecuteCommandOutput ¶
ExecuteCommandOutput runs the command and returns its combined standard output and standard error.
func IndentString ¶
IndentString will Add x space char padding at the beginging of each line.
func ItemInSlice ¶
func ReflectStructValueIntoMap ¶ added in v0.1.0
func ReflectStructValueIntoMap(resource interface{}, tagName string, paramsToFill map[string]string)
ReflectStructValueIntoMap receives a resource of struct type as
type AWSCreds struct{ AccessKeyID string `yaml:"accessKeyId,omitempty"` SecretAccessKey string `yaml:"secretAccessKey,omitempty"` }{
AccessKeyID: "FOO", SecretAccessKey: "BAR", }
It will base on the tag, fill in the value to supplied map[string]string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.