goenv

package
v0.0.0-...-3a2791a Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// RootDir is first element of GOPATH
	RootDir string

	// ExeSuffix is extension of executable file name for the OS.
	// ".exe" for Windows, "" for other OS.
	ExeSuffix string

	// IsWindows is true for Windows.
	IsWindows bool

	EnableModule bool

	Verbose bool
}

Env is information of gtc running environment.

var Default Env

Default is default `Env` for current running environment.

func New

func New(root string) *Env

New creates `*Env`

func (*Env) HasTool

func (env *Env) HasTool(tool string) bool

HasTool checks a specified tool is installed or not.

func (*Env) Install

func (env *Env) Install(path string) error

Install installs a tool.

func (*Env) OldTools

func (env *Env) OldTools(pivot time.Time) ([]string, error)

OldTools returns list of tools, which are not updated recently.

func (*Env) Tools

func (env *Env) Tools() ([]string, error)

Tools returns all installed tools.

func (*Env) Uninstall

func (env *Env) Uninstall(tool string) error

Uninstall uninstalls a tool from "$GOPATH/bin".

func (*Env) Update

func (env *Env) Update(path, tool string) error

Update update a tool.

Jump to

Keyboard shortcuts

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