Documentation
¶
Index ¶
- func Argv(ctx *config.Context, commandText string) ([]string, bool, error)
- func ArgvInProject(ctx *config.Context, projectDir, commandText string) ([]string, bool, error)
- func ExpandHostIdentity(commandText, uid, gid string) (string, error)
- func ProjectScriptPath(projectDir string, argv []string) (string, string, error)
- type CommandList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArgvInProject ¶
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 ¶
ExpandHostIdentity replaces the only supported lifecycle substitutions with values resolved by the caller for the target host.
func ProjectScriptPath ¶
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 ¶
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.