env

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInPath

func IsInPath(executablePath string) bool

IsInPath checks if the directory of the executable is in the PATH environment variable

Types

type Env

type Env struct {
	// Home is the user's home directory.
	Home string
	// AppHomeDir is the directory in the user's home directory where the app
	// stores its data.
	AppHomeDir string
	// KeyPath is the path to the key file.
	KeyPath string
	// ExeCmd is the command to run the executable. If the executable is in the
	// PATH environment variable, this will be the executable name.
	ExeCmd string
}

func GetEnv

func GetEnv() (*Env, error)

GetEnv returns the singleton instance of Env.

Jump to

Keyboard shortcuts

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