Go - go (The Go tool)

Card Puncher Data Processing

About

https://golang.org/cmd/go/

The go tool builds source packages and installs the resulting binaries to the pkg and bin directories of the workspace

The go tool will only print output when an error occurs.

Sub-command

Build / Compile

go build pathToGoPackageFromGoPathSrc
# or (default to the current directory)
go build 

Install

go install pathToGoScriptFromGoPathSrc

put an executable command named hello (or hello.exe) inside the bin directory of your workspace

Whenever the go tool installs a package or binary, it also installs whatever dependencies it has in the pkg directory of the workspace





Discover More
Card Puncher Data Processing
Go

has: garbage collection, a package system, first-class functions, lexical scope, a system call interface, and immutable strings in which text is generally encoded in UTF-8. But it has...
Card Puncher Data Processing
Go - Base Path (Package Root)

The base path is the root path of (custom|user) package (ie not go standard library or other external libraries) For example: if you have a GitHub account at github.com/user, you can choose it as...
Card Puncher Data Processing
Go - Testing

Go has a lightweight test framework composed of: the go test command and the testing package. Create a file myGoFile_test.go in the same directory that the file to test myGoFile To add a setup...



Share this page:
Follow us:
Task Runner