filesystem

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GORooTEnvVariable = "GOROOT"
)

Variables

View Source
var (
	ErrGORootIsNotFound = errors.New("$GOROOT is not found in environmental variables")
	ErrGORootMustBeSet  = errors.New("$GOROOT must be set by user")

	ErrGoRootNotFoundInPath = errors.New("")
)
View Source
var (
	ErrInvalidVersion = errors.New("invalid version")
)
View Source
var (
	ErrVersionIsNotFound = errors.New("version is not found")
)

Functions

func ValidateVersion

func ValidateVersion(version string) error

Types

type EnvConfigurator added in v0.1.0

type EnvConfigurator interface {
	GetGoRoot() (string, error)
	GetHomePath() string
	ShouldSetInPathVariable() bool
	SetFilePathToPathVariable(goRoot string) error
}

type EnvVariableManager added in v0.1.0

type EnvVariableManager struct {
}

func (*EnvVariableManager) GetGoRoot added in v0.1.0

func (m *EnvVariableManager) GetGoRoot() (string, error)

func (*EnvVariableManager) GetHomePath added in v0.1.0

func (m *EnvVariableManager) GetHomePath() string

func (*EnvVariableManager) SetFilePathToPathVariable added in v0.1.0

func (m *EnvVariableManager) SetFilePathToPathVariable(goRoot string) error

func (*EnvVariableManager) ShouldSetInPathVariable added in v0.1.0

func (m *EnvVariableManager) ShouldSetInPathVariable() bool

type FileManagement

type FileManagement struct {
	// contains filtered or unexported fields
}

func New

func New() (*FileManagement, error)

func (*FileManagement) CheckGoPackageExistence added in v0.1.0

func (fm *FileManagement) CheckGoPackageExistence(version string) error

func (*FileManagement) DeleteGoPackage

func (fm *FileManagement) DeleteGoPackage(version string) error

func (*FileManagement) DownloadGoPackage

func (fm *FileManagement) DownloadGoPackage(version string) error

func (*FileManagement) ListGoPackageVersions

func (fm *FileManagement) ListGoPackageVersions() ([]string, error)

func (*FileManagement) UseGoPackage

func (fm *FileManagement) UseGoPackage(version string) error

Jump to

Keyboard shortcuts

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