shell

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultShell string = _DEFAULT_SHELL

Variables

This section is empty.

Functions

This section is empty.

Types

type ShellConfig

type ShellConfig map[string]string

ShellConfig maps OS names to shell invocation strings used when running pre/post commands. The map keys are runtime.GOOS values or the special key "unix" as a catch-all for non-Windows systems.

Example wrapfile usage:

shell:
  unix: bash -c      # linux, darwin, freebsd, etc.
  darwin: zsh -c     # macOS specifically (overrides unix)
  windows: cmd /c
  plan9: rc -c

Resolution order for a given OS:

  1. Exact OS name (e.g. "linux", "darwin", "netbsd", "plan9")
  2. "unix" — matches any non-Windows OS
  3. Built-in default: "cmd /c" on Windows, "sh -c" everywhere else

func (ShellConfig) ForHost

func (s ShellConfig) ForHost() string

func (ShellConfig) ForOS

func (s ShellConfig) ForOS(goos string) string

ForOS returns the shell invocation string to use for the given GOOS value.

Jump to

Keyboard shortcuts

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