helpers

package
v0.107.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigurationReadFailed = errors.New("failed to read configuration")

Functions

func ConsumeSubCommands

func ConsumeSubCommands(cmd *cobra.Command, subCommands []*cobra.Command) *cobra.Command

func EnvArgsToMap added in v0.19.0

func EnvArgsToMap(arguments []string) map[string]string

envArgsToMap parses and expands environment arguments like "A=B" (set operation) and "A" (pass-through operation) into a map suitable for use across the codebase.

func EnvFileToMap added in v0.98.0

func EnvFileToMap(envFilePath string) (map[string]string, error)

func EvaluateStarlarkConfig added in v0.19.0

func EvaluateStarlarkConfig(ctx context.Context, path string, env map[string]string) (string, error)

func GitDiff added in v0.64.0

func GitDiff(dir string, revision string, cached bool) ([]string, error)

GitDiff is a simplified "git diff" and "git diff --cached" implementation using go-git.

GitDiff closely resembles the implementation of go-git Worktree's Status() method.

func ReadCombinedConfig added in v0.19.0

func ReadCombinedConfig(ctx context.Context, env map[string]string) (string, error)

func ReadYAMLConfig added in v0.19.0

func ReadYAMLConfig(path string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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