initflow

package
v0.1.7-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package initflow provides interactive workflow builders for setup tasks.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEnvFormat   = errors.New("expected KEY=VALUE")
	ErrInvalidEnvKey      = errors.New("must match ^[A-Z][A-Z0-9_]*$")
	ErrNewlinesNotAllowed = errors.New("newlines are not allowed")
)

ErrInvalidEnvFormat is returned when an environment entry is malformed.

Functions

func MergeEnvMaps

func MergeEnvMaps(base, fromFile, fromFlags map[string]string) (map[string]string, map[string]string)

MergeEnvMaps merges multiple environment maps with priority order.

func ParseEnvFile

func ParseEnvFile(path string) (map[string]string, error)

ParseEnvFile parses environment variables from a file.

func ParseEnvFlags

func ParseEnvFlags(entries []string) (map[string]string, error)

ParseEnvFlags parses environment variables from command-line arguments.

func ResolveVersionInput

func ResolveVersionInput(input string, versions []customerapi.Version) (customerapi.Version, bool)

ResolveVersionInput resolves a version input string to a full version.

func SortVersionsDesc

func SortVersionsDesc(versions []customerapi.Version)

SortVersionsDesc sorts versions by release date in descending order.

func ValidateEnvKey

func ValidateEnvKey(key string) error

ValidateEnvKey checks if an environment variable key is valid.

Types

type DisplayVersion

type DisplayVersion struct {
	Value int
	Label string
}

DisplayVersion represents a version option for display.

func BuildVersionOptions

func BuildVersionOptions(versions []customerapi.Version, maxVersion int) []DisplayVersion

BuildVersionOptions builds display options for a version selection.

Jump to

Keyboard shortcuts

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