Documentation ¶ Index ¶ func Truncate(s string, maxRunes int) string type ShellSpec func DetectShell() (ShellSpec, error) func NewShellCommand(command string) (*exec.Cmd, ShellSpec, error) func NewShellCommandContext(ctx context.Context, command string) (*exec.Cmd, ShellSpec, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Truncate ¶ func Truncate(s string, maxRunes int) string Truncate truncates a string to maxRunes runes, appending "..." if truncated. Uses []rune to avoid UTF-8 multi-byte truncation. Types ¶ type ShellSpec ¶ type ShellSpec struct { Path string Args []string Name string } func DetectShell ¶ func DetectShell() (ShellSpec, error) func NewShellCommand ¶ func NewShellCommand(command string) (*exec.Cmd, ShellSpec, error) func NewShellCommandContext ¶ func NewShellCommandContext(ctx context.Context, command string) (*exec.Cmd, ShellSpec, error) Source Files ¶ View all Source files shell.gotruncate.go Click to show internal directories. Click to hide internal directories.