usershell
package v2.23.0
Go to latest Published: Jun 3, 2025 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:4 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
Types¶
typeEnvInfoer¶added inv2.21.0
type EnvInfoer interface {// User returns the current user.User() (*user.User,error)// Environ returns the environment variables of the current process.Environ() []string// HomeDir returns the home directory of the current user.HomeDir() (string,error)// Shell returns the shell of the given user.Shell(usernamestring) (string,error)// ModifyCommand modifies the command and arguments before execution based on// the environment. This is useful for executing a command inside a container.// In the default case, the command and arguments are returned unchanged.ModifyCommand(namestring, args ...string) (string, []string)}
EnvInfoer encapsulates external information about the environment.
typeSystemEnvInfo¶added inv2.21.0
type SystemEnvInfo struct{}
SystemEnvInfo encapsulates the information about the environmentjust using the default Go implementations.
func (SystemEnvInfo)Environ¶added inv2.21.0
func (SystemEnvInfo) Environ() []string
func (SystemEnvInfo)HomeDir¶added inv2.21.0
func (SystemEnvInfo) HomeDir() (string,error)
func (SystemEnvInfo)ModifyCommand¶added inv2.21.0
func (SystemEnvInfo) ModifyCommand(namestring, args ...string) (string, []string)
Click to show internal directories.
Click to hide internal directories.