utils

package
v0.0.0-...-e7aa5da Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepSearchExecutable

func DeepSearchExecutable(cmdName string, roots []string) string

DeepSearchExecutable performs a more intensive search in specific root directories. It looks for the cmdName in subdirectories of roots, but limits depth for performance.

func DirExists

func DirExists(path string) bool

DirExists returns true if the given path exists and is a directory

func EnsureDir

func EnsureDir(path string) error

EnsureDir creates a directory (and any parents) if it doesn't exist

func FileExists

func FileExists(path string) bool

FileExists returns true if the given path exists and is a file

func FindExecutable

func FindExecutable(cmdName string, fallbackGlobs []string) string

FindExecutable attempts to find an executable by name in PATH or fallback glob patterns.

func GetShellCommand

func GetShellCommand(command string) *exec.Cmd

func JoinPath

func JoinPath(elem ...string) string

JoinPath is a convenience wrapper around filepath.Join

func OpenBrowser

func OpenBrowser(url string) error

OpenBrowser opens the specified URL in the default browser in a cross-platform way.

func OpenFile

func OpenFile(path string) error

func PrintError

func PrintError(msg string)

PrintError prints a red error message

func PrintSuccess

func PrintSuccess(msg string)

PrintSuccess prints a green success message

func StripExt

func StripExt(name string) string

StripExt returns the file name without extension

Types

This section is empty.

Jump to

Keyboard shortcuts

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