Documentation
¶
Index ¶
- Variables
- func BinExists(s string) bool
- func BinPath(s string) string
- func CopyClipboard(s string) error
- func Env(s, def string) string
- func ErrAndExit(err error)
- func ExecuteCmd(arg ...string) error
- func OSArgs() []string
- func OpenInBrowser(s string) error
- func ReadClipboard() string
- func RunCmd(s string, arg ...string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCopyToClipboard = errors.New("copy to clipboard") ErrNotImplementedYet = errors.New("not implemented yet") )
Functions ¶
func CopyClipboard ¶
CopyClipboard copies a string to the clipboard.
func Env ¶
Env retrieves an environment variable.
If the environment variable is not set, returns the default value.
func ErrAndExit ¶ added in v0.1.5
func ErrAndExit(err error)
ErrAndExit logs the error and exits the program.
func ExecuteCmd ¶
ExecuteCmd runs a command with the given arguments and returns an error if the command fails.
func OpenInBrowser ¶
OpenInBrowser opens a URL in the default browser.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package files provides utilities for working with files/directories.
|
Package files provides utilities for working with files/directories. |
Spinner displays a spinning cursor animation while waiting for a signal on a channel.
|
Spinner displays a spinning cursor animation while waiting for a signal on a channel. |
Click to show internal directories.
Click to hide internal directories.