Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanWrite ¶
CanWrite returns true if a directory or a file specified by the path can be written.
func IsExecutable ¶
IsExecutable returns true if a file under the given path looks like binary file that has executable rights. It's right most of the time.
func Update ¶
func Update(opts UpdateOpts)
Update checks out repositories for each Go executable in b slice in a temporary directory, builds new executable and replaces it with the old one. The update is performed on multiple goroutines. Setting GOMAXPROCS may speed up this function.
Types ¶
type Bin ¶
type Bin struct { Path string Package string CanWrite bool // contains filtered or unexported fields }
Bin represents single Go executable.
func Search ¶
Search looks for Go executables in all the directories specified by the dirs slice. If dirs is nil or empty, executables are looked up in directories specified by the $GOPATH, $GOBIN and $PATH environment variables. The lookup is performed on multiple goroutines. Setting GOMAXPROCS may speed up this function.
func SearchSymlink ¶
Search looks for Go executables in all the directories specified by the dirs slice resolving any symlinks it discovers. If dirs is nil or empty, executables are looked up in directories specified by the $GOPATH, $GOBIN and $PATH environment variables. The lookup is performed on multiple goroutines. Setting GOMAXPROCS may speed up this function. TODO: The symlink part is not implemented yet, map is always nil/empty.