Documentation ¶
Index ¶
- Constants
- Variables
- func CreateExampleRecipe(name string) *recipe.Recipe
- func CreateExampleTest() *recipe.Test
- func CreateFileTree(root string, files map[string]recipe.File) string
- func FilterVariablesWithoutValues(variables []recipe.Variable, values recipe.VariableValues) []recipe.Variable
- func IsFileModified(path string, file recipe.File) (bool, error)
- func MergeValues(valuesSlice ...recipe.VariableValues) recipe.VariableValues
- func ParseProvidedValues(variables []recipe.Variable, flags []string) (recipe.VariableValues, error)
- func PromptUserForValues(variables []recipe.Variable) (recipe.VariableValues, error)
- type AskFunc
Constants ¶
View Source
const ValueEnvVarPrefix = "JALAPENO_VAR_"
Variables ¶
View Source
var (
ErrVarNotDefinedInRecipe = errors.New("following variable does not exist in the recipe")
)
Functions ¶
func CreateExampleRecipe ¶ added in v0.1.1
func CreateExampleTest ¶ added in v0.1.1
func CreateFileTree ¶ added in v0.1.4
func FilterVariablesWithoutValues ¶ added in v0.1.0
func IsFileModified ¶ added in v0.1.0
func MergeValues ¶ added in v0.1.0
func MergeValues(valuesSlice ...recipe.VariableValues) recipe.VariableValues
func ParseProvidedValues ¶ added in v0.1.0
func PromptUserForValues ¶
func PromptUserForValues(variables []recipe.Variable) (recipe.VariableValues, error)
Types ¶
type AskFunc ¶
type AskFunc func(prompt survey.Prompt, opts []survey.AskOpt) (interface{}, error)
NOTE: Since survey.AskOne tries to cast the answer to the type of the response value pointer and the type of response value can not be interface{}, we need to create different ask functions for each response type and return interface{}
Click to show internal directories.
Click to hide internal directories.