Updating: For those who still need the precise functionality of running

$ go doc
in a directory, the behavior is identical to running

$ godoc .
Updating: For those who still need the precise functionality of running

$ go doc
in a directory, the behavior is identical to running

$ godoc .
The cover tool does two things. First, when "go test" is given the -cover flag, it is run automatically to rewrite the source for the package and insert instrumentation statements. The test is then compiled and run as usual, and basic coverage statistics are reported:

$ go test -cover fmt
ok  	fmt	0.060s	coverage: 91.4% of statements
$
Details on how to generate and analyze coverage statistics can be found by running the commands

$ go help testflag
$ go tool cover -help
When building from source, users must use "go get" to install godoc and vet. (The binaries will continue to be installed in their usual locations, not $GOPATH/bin.)

$ go get code.google.com/p/go.tools/cmd/godoc
$ go get code.google.com/p/go.tools/cmd/vet
The cover tool is part of the go.tools subrepository. It can be installed by running

$ go get code.google.com/p/go.tools/cmd/cover
The go test command no longer deletes the binary when run with profiling enabled, to make it easier to analyze the profile. The implementation sets the -c flag automatically, so after running,

$ go test -cpuprofile cpuprof.out mypackage
Second, the go get command no longer allows $GOROOT as the default destination when downloading package source. To use the go get command, a valid $GOPATH is now required.

$ GOPATH= go get code.google.com/p/foo/quxx
package code.google.com/p/foo/quxx: cannot download, $GOPATH not set. For more details see: go help gopath
Finally, as a result of the previous change, the go get command will also fail when $GOPATH and $GOROOT are set to the same value.

$ GOPATH=$GOROOT go get code.google.com/p/foo/quxx
warning: GOPATH set to GOROOT (/home/you/go) has no effect
package code.google.com/p/foo/quxx: cannot download, $GOPATH must not be set to $GOROOT. For more details see: go help gopath
First, when compiling, testing, or running Go code, the go command will now give more detailed error messages, including a list of paths searched, when a package cannot be located.

$ go build foo/quxx
can't load package: package foo/quxx: cannot find package "foo/quxx" in any of:
        /home/you/go/src/pkg/foo/quxx (from $GOROOT)
        /home/you/src/foo/quxx (from $GOPATH)

Recommend

Go 1.2 Release Notes Changes to the implementations and tools Test coverage

Go 1.2 Release Notes Changes to the implementations and tools Godoc and vet moved to the go.tools subrepository

Go 1.2 Release Notes Changes to the language Three-index slices

Go 1.2 Release Notes Changes to the language Use of nil

Go 1.5 Release Notes Core library Flag

Go 1.5 Release Notes Tools Trace command

Go 1.5 Release Notes Tools Linker

Go 1.5 Release Notes Tools Assembler

Go 1.5 Release Notes Tools Renaming

Go 1.5 Release Notes Changes to the language Map literals

Go 1.17 Release Notes Tools Vet New warnings for Is, As and Unwrap methods

Go 1.17 Release Notes Tools Vet New warning for calling signal.Notify on unbuffered channels

Go 1.17 Release Notes Tools Go command Pruned module graphs in go 1.17 modules

Debugging Go Code with GDB Tutorial Pretty Printing

Debugging Go Code with GDB Tutorial Inspecting the stack

Debugging Go Code with GDB Tutorial Setting breakpoints

Debugging Go Code with GDB Tutorial Inspecting the source

Debugging Go Code with GDB Tutorial Getting Started

Debugging Go Code with GDB Introduction Go Extensions

Debugging Go Code with GDB Introduction Common Operations

Bootstrap Components Creating your own

Bootstrap Components Responsive

Bootstrap Components Modifiers

Bootstrap Optimize Lean JavaScript Default Exports

Bootstrap Optimize Lean JavaScript

Bootstrap Optimize Lean Sass imports

Bootstrap CSS variables Examples

Bootstrap CSS variables Root variables

Bootstrap Sass Mixins Color schemes

Bootstrap Sass Functions Add and Subtract functions

Bootstrap Sass Functions Color contrast

Bootstrap Sass Functions Colors

Bootstrap Sass Maps and loops Remove from map

Bootstrap Sass Maps and loops Add to map

Bootstrap Sass Maps and loops Modify map

Bootstrap Sass Variable defaults

Bootstrap Sass Importing

Bootstrap Sass File structure

Bootstrap Color Generating utilities

Bootstrap Color Color Sass maps Example

Bootstrap Color Color Sass maps

Bootstrap Color Theme colors

Bootstrap JavaScript Sanitizer

Bootstrap JavaScript Version numbers

Bootstrap JavaScript No conflict (only if you use jQuery)

Bootstrap JavaScript Programmatic API Default settings

Bootstrap JavaScript Programmatic API Asynchronous functions and transitions

Bootstrap JavaScript Programmatic API CSS selectors in constructors

Bootstrap JavaScript Programmatic API

Bootstrap JavaScript jQuery events

Bootstrap JavaScript Events

JavaScript Using Bootstrap as a module

Bootstrap Browsers and devices Supported browsers

Bootstrap Accessibility Overview and limitations Visually hidden content

Bootstrap Webpack and bundlers Importing Styles Importing Compiled CSS

Bootstrap Webpack and bundlers Importing Styles Importing Precompiled Sass