recipeutil

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 CreateExampleRecipe(name string) *recipe.Recipe

func CreateExampleTest added in v0.1.1

func CreateExampleTest() *recipe.Test

func CreateFileTree added in v0.1.4

func CreateFileTree(root string, files map[string]recipe.File) string

func FilterVariablesWithoutValues added in v0.1.0

func FilterVariablesWithoutValues(variables []recipe.Variable, values recipe.VariableValues) []recipe.Variable

func IsFileModified added in v0.1.0

func IsFileModified(path string, file recipe.File) (bool, error)

func MergeValues added in v0.1.0

func MergeValues(valuesSlice ...recipe.VariableValues) recipe.VariableValues

func ParseProvidedValues added in v0.1.0

func ParseProvidedValues(variables []recipe.Variable, flags []string) (recipe.VariableValues, error)

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{}

Jump to

Keyboard shortcuts

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