Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotGoExec is an error. ErrNotGoExec = errors.New("which: not a Go executable") // ErrGuessFail is an error. ErrGuessFail = errors.New("which: unable to guess an import path of the main package") )
View Source
var ( // PlatformDarwin386 represents the darwin_386 target arch. PlatformDarwin386 = &PlatformType{"darwin", "386"} // PlatformDarwinAMD64 represents the darwin_amd64 target arch. PlatformDarwinAMD64 = &PlatformType{"darwin", "amd64"} // PlatformFreeBSD386 represents the freebsd_386 target arch. PlatformFreeBSD386 = &PlatformType{"freebsd", "386"} // PlatformFreeBSDAMD64 represents the freebsd_amd64 target arch. PlatformFreeBSDAMD64 = &PlatformType{"freebsd", "amd64"} // PlatformLinux386 represents the linux_386 target arch. PlatformLinux386 = &PlatformType{"linux", "386"} // PlatformLinuxAMD64 represents the linux_amd64 target arch. PlatformLinuxAMD64 = &PlatformType{"linux", "amd64"} // PlatformWindows386 represents the windows_386 target arch. PlatformWindows386 = &PlatformType{"windows", "386"} // PlatformWindowsAMD64 represents the windows_amd64 target arch. PlatformWindowsAMD64 = &PlatformType{"windows", "amd64"} )
Functions ¶
Types ¶
type Exec ¶
type Exec struct { Path string // Path to the executable. Type *PlatformType // Fileutable file format. // contains filtered or unexported fields }
Exec represents a single Go executable file.
type PlatformType ¶
type PlatformType struct { GOOS string // target operating system GOARCH string // target architecture }
PlatformType represents the target platform of the executable.
func (PlatformType) String ¶
func (typ PlatformType) String() string
String gives Go platform string.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
gofile
cmd/gofile shows the platform string of Go executables cmd/gofile takes one argument, which is either program name or abosolute or relative path to an executable; when a program name is provided, it's looked up up in the $PATH.
|
cmd/gofile shows the platform string of Go executables cmd/gofile takes one argument, which is either program name or abosolute or relative path to an executable; when a program name is provided, it's looked up up in the $PATH. |
gowhich
cmd/gowhich shows the import path of Go executables cmd/gowhich takes one argument, which is either program name or abosolute or relative path to an executable; when a program name is provided, it's looked up up in the $PATH.
|
cmd/gowhich shows the import path of Go executables cmd/gowhich takes one argument, which is either program name or abosolute or relative path to an executable; when a program name is provided, it's looked up up in the $PATH. |
Click to show internal directories.
Click to hide internal directories.