To make it easier for binary distributions to access them if desired, the exp and old source subtrees, which are not included in binary distributions, have been moved to the new go.exp subrepository at code.google.com/p/go.exp. To access the ssa package, for example, run

$ go get code.google.com/p/go.exp/ssa
To make it easier for binary distributions to access them if desired, the exp and old source subtrees, which are not included in binary distributions, have been moved to the new go.exp subrepository at code.google.com/p/go.exp. To access the ssa package, for example, run

$ go get code.google.com/p/go.exp/ssa
The various routines to scan textual input in the bufio package, ReadBytes, ReadString and particularly ReadLine, are needlessly complex to use for simple purposes. In Go 1.1, a new type, Scanner, has been added to make it easier to do simple tasks such as read the input as a sequence of lines or space-delimited words. It simplifies the problem by terminating the scan on problematic input such as pathologically long lines, and having a simple default: line-oriented input, with each line stripped of its terminator. Here is code to reproduce the input a line at a time:

scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
    fmt.Println(scanner.Text()) // Println will add back the final '\n'
}
if err := scanner.Err(); err != nil {
    fmt.Fprintln(os.Stderr, "reading standard input:", err)
}
These functions behave slightly differently from the corresponding Go operators. First, they operate only on basic types (bool, int, float64, string, etc.). (Go allows comparison of arrays and structs as well, under some circumstances.) Second, values can be compared as long as they are the same sort of value: any signed integer value can be compared to any other signed integer value for example. (Go does not permit comparing an int8 and an int16). Finally, the eq function (only) allows comparison of the first argument with one or more following arguments. The template in this example,

{{if eq .A 1 2 3}} equal {{else}} not equal {{end}}
The second change is that a small addition to the grammar makes "if else if" chains easier to write. Instead of writing,

{{if eq .A 1}} X {{else}} {{if eq .A 2}} Y {{end}} {{end}}
one can fold the second "if" into the "else" and have only one "end", like this:

{{if eq .A 1}} X {{else if eq .A 2}} Y {{end}}
The motivation for this feature is programmable format statements to access the arguments in different order for localization, but it has other uses:

log.Printf("trace: value %v of type %[1]T\n", expensiveFunction(a.b[c]))
would create the string "a b c", but with indexing operations like this,

fmt.Sprintf("%[3]c %[1]c %c\n", 'a', 'b', 'c')
The following list summarizes a number of minor changes to the library, mostly additions. See the relevant package documentation for more information about each change.

func TestMain(m *testing.M)
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

Recommend

Go 1.1 Release Notes Changes to the standard library bufio.Scanner

Go 1.1 Release Notes Changes to the implementations and tools Build constraints

Go 1.1 Release Notes Changes to the implementations and tools Changes to the go test command

Go 1.1 Release Notes Changes to the implementations and tools Changes to the go command

Go 1.1 Release Notes Changes to the implementations and tools Unicode

Go 1.1 Release Notes Changes to the implementations and tools Size of int on 64-bit platforms

Go 1.1 Release Notes Changes to the language Method values

Go 1.1 Release Notes Changes to the language Integer division by zero

Go 1.8 Release Notes Changes to the language

Go 1.2 Release Notes Changes to the standard library The text/template and html/template packages

Go 1.2 Release Notes Changes to the standard library The fmt package

Go 1.2 Release Notes Changes to the implementations and tools The go doc command is deleted

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