Skip to content

Commit 002c6d2

Browse files
committed
gotypes: updates for dropping of Go 1.4 support in x/tools
Change-Id: Ibb2b40434701d33f33c4d7cb72e80393b005f8ce Reviewed-on: https://go-review.googlesource.com/20048 Reviewed-by: Robert Griesemer <[email protected]>
1 parent aec836b commit 002c6d2

File tree

5 files changed

+5
-30
lines changed

5 files changed

+5
-30
lines changed

gotypes/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
all: README.md
3+
go build ./...
34

45
README.md: go-types.md weave.go $(wildcard */*.go)
56
go run weave.go go-types.md >README.md

gotypes/README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ This document is maintained by Alan Donovan `[email protected]`.
3838

3939
The [`go/types` package]('https://golang.org/pkg/go/types) is a
4040
type-checker for Go programs, designed by Robert Griesemer.
41+
It became part of Go's standard library in Go 1.5.
4142
Measured by lines of code and by API surface area, it is one of the
4243
most complex packages in Go's standard library, and using it requires
4344
a firm grasp of the structure of Go programs.
@@ -47,16 +48,6 @@ We assume you are a proficient Go programmer who wants to build tools
4748
to analyze or manipulate Go programs and that you have some knowledge
4849
of how a typical compiler works.
4950

50-
51-
52-
The `go/types` package became part of Go's standard library in Go 1.5.
53-
Prior to that, it was located at
54-
[`golang.org/x/tools/go/types`](https://godoc.org/golang.org/x/tools/go/types),
55-
though that package will be deleted one month after the release
56-
of Go 1.6 in early 2016.
57-
58-
59-
6051
The type checker complements several existing
6152
standard packages for analyzing Go programs.
6253
We've listed them below.
@@ -92,10 +83,6 @@ from the `x/tools` repository is a client of the type
9283
checker that loads, parses, and type-checks a complete Go program from
9384
source code.
9485
We use it in some of our examples and you may find it useful too.
95-
(Please note that until March 2016, the
96-
`golang.org/x/tools/...` packages will continue to depend on the
97-
old `golang.org/x/tools/go/types` package, not on the
98-
new standard `go/types` package. The two are almost identical.)
9986

10087

10188

gotypes/go-types.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This document is maintained by Alan Donovan `[email protected]`.
1515

1616
The [`go/types` package]('https://golang.org/pkg/go/types) is a
1717
type-checker for Go programs, designed by Robert Griesemer.
18+
It became part of Go's standard library in Go 1.5.
1819
Measured by lines of code and by API surface area, it is one of the
1920
most complex packages in Go's standard library, and using it requires
2021
a firm grasp of the structure of Go programs.
@@ -24,16 +25,6 @@ We assume you are a proficient Go programmer who wants to build tools
2425
to analyze or manipulate Go programs and that you have some knowledge
2526
of how a typical compiler works.
2627

27-
28-
29-
The `go/types` package became part of Go's standard library in Go 1.5.
30-
Prior to that, it was located at
31-
[`golang.org/x/tools/go/types`](https://godoc.org/golang.org/x/tools/go/types),
32-
though that package will be deleted one month after the release
33-
of Go 1.6 in early 2016.
34-
35-
36-
3728
The type checker complements several existing
3829
standard packages for analyzing Go programs.
3930
We've listed them below.
@@ -69,10 +60,6 @@ from the `x/tools` repository is a client of the type
6960
checker that loads, parses, and type-checks a complete Go program from
7061
source code.
7162
We use it in some of our examples and you may find it useful too.
72-
(Please note that until March 2016, the
73-
`golang.org/x/tools/...` packages will continue to depend on the
74-
old `golang.org/x/tools/go/types` package, not on the
75-
new standard `go/types` package. The two are almost identical.)
7663

7764

7865

gotypes/hugeparam/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
"fmt"
1010
"go/ast"
1111
"go/token"
12+
"go/types"
1213
"log"
1314

1415
"golang.org/x/tools/go/loader"
15-
"golang.org/x/tools/go/types" // TODO: will use std go/types after Mar 2016
1616
)
1717

1818
//!+

gotypes/skeleton/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ package main
1212

1313
import (
1414
"fmt"
15+
"go/types"
1516
"log"
1617
"os"
1718
"strings"
1819
"unicode"
1920
"unicode/utf8"
2021

2122
"golang.org/x/tools/go/loader"
22-
"golang.org/x/tools/go/types" // TODO: will use std go/types after Feb 2016
2323
)
2424

2525
const usage = "Usage: skeleton <package> <interface> <concrete>"

0 commit comments

Comments
 (0)