cmd/vet: eliminate false positives for slices in untagged literal test
Made possible by go/types, as long as the package type-checks OK.

Fixes issue 4684.

R=golang-dev
CC=golang-dev
https://codereview.appspot.com/7407045
cmd/vet: fix up some nits in print.go found by kamil.kisiel@gmail.com

R=golang-dev, kamil.kisiel, bradfitz
CC=golang-dev
https://codereview.appspot.com/7369049
cmd/godoc: show examples in text mode

Added the command line flag -ex to godoc to print examples in
text output.

Samples from the generated output:

$ godoc -ex strings Index
...
func Index(s, sep string) int
    Index returns the index of the first instance of sep in s, or -1 if sep
    is not present in s.

    Example:
        fmt.Println(strings.Index("chicken", "ken"))
        fmt.Println(strings.Index("chicken", "dmr"))
        // Output:
        // 4
        // -1
...

$ godoc -ex container/heap
...
package heap
    import "container/heap"

    Package heap provides heap operations for any type that implements
    heap.Interface. A heap is a tree with the property that each node is the
    minimum-valued node in its subtree.

    Example:
        // This example demonstrates an integer heap built using the heap interface.
        package heap_test

        import (
            "container/heap"
            "fmt"
        ...

    Example:
        // This example demonstrates a priority queue built using the heap interface.
        package heap_test

        import (
            "container/heap"
            "fmt"
        )
...


Fixes issue 3587.

R=golang-dev, minux.ma, adg, rsc, gri
CC=golang-dev
https://codereview.appspot.com/7356043

Committer: Andrew Gerrand <adg@golang.org>
go/types: unresolved literal keys must be looked up in universe.

Fixes issue 4888.

R=golang-dev, gri
CC=golang-dev
https://codereview.appspot.com/7383051

Committer: Robert Griesemer <gri@golang.org>