cmd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGoenvRootDirectory = "/usr/local/go"
	DefaultGoInstallDirectory = "/usr/local/goenv"

	GoEnvRootDirEnvVar    = "GOENV_ROOT_DIR"
	GoEnvInstallDirEnvVar = "GOENV_INSTALL_DIR"
)
View Source
const (
	PermError string = "you do not have access to %v"
)

Variables

This section is empty.

Functions

func ConfigCommand added in v0.0.4

func ConfigCommand(cmd *cobra.Command, _ []string)

func InstallCommand

func InstallCommand(cmd *cobra.Command, args []string) error

func ListCommand

func ListCommand(cmd *cobra.Command, args []string) error

func PostRun added in v0.2.0

func PostRun(cmd *cobra.Command, _ []string)

PostRun checks for new versions of Goenv and Go.

func UninstallCommand

func UninstallCommand(cmd *cobra.Command, args []string) error

func UseCommand

func UseCommand(cmd *cobra.Command, args []string) error

func ValidateVersionArg added in v0.2.0

func ValidateVersionArg(cmd *cobra.Command, args []string) error

parseVersionArg ensures that the subcommands that accept a parameter only spcify one parameter.

Types

type Config added in v0.2.0

type Config struct {
	// The file placed at GoenvRootDirectory is a symlink to the GoenvInstallDirectory
	GoenvRootDirectory string

	// Install directory defaults to /usr/local/goenv and can be configured with
	GoenvInstallDirectory string
}

func ReadConfig added in v0.2.0

func ReadConfig() *Config

ReadConfig reads the environment variables for a user and creates a config. If we need any additional config, it'll be parsed in here.

func (*Config) String added in v0.2.0

func (c *Config) String() string

String prints the config to a tabwriter so that the columns are aligned when it's fmt.Print'ed to the terminal.

type GoEnvContextKey added in v0.1.0

type GoEnvContextKey string

Jump to

Keyboard shortcuts

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