lifecycle

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Argv

func Argv(ctx *config.Context, commandText string) ([]string, bool, error)

Argv parses one command segment and injects context-owned Compose options.

func ArgvInProject

func ArgvInProject(ctx *config.Context, projectDir, commandText string) ([]string, bool, error)

ArgvInProject parses one command segment using an explicit Compose project directory. It resolves the supported $PWD volume source from that directory in Go, without relying on shell expansion.

func ExpandHostIdentity

func ExpandHostIdentity(commandText, uid, gid string) (string, error)

ExpandHostIdentity replaces the only supported lifecycle substitutions with values resolved by the caller for the target host.

func ProjectScriptPath

func ProjectScriptPath(projectDir string, argv []string) (string, string, error)

ProjectScriptPath resolves a direct project script invocation without looking it up through a shell. Empty results mean argv invokes a normal PATH executable or a command inside a Compose container rather than a host script.

Types

type CommandList

type CommandList struct {
	Commands  []string
	Operators []string
}

CommandList is a constrained &&/|| list of direct argv commands.

func Parse

func Parse(commandText string) (CommandList, error)

Parse accepts direct commands and logical-list operators. Other shell grammar is rejected so substantive programs must live in checked-in files.

Jump to

Keyboard shortcuts

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