diff --git a/doc/all.css b/doc/all.css index 23611c6db87..29c2895abc8 100644 --- a/doc/all.css +++ b/doc/all.css @@ -214,3 +214,9 @@ sup.new { .exampleHeading { cursor: pointer; } + +/* Table of code entries; used by go1.html */ +.codetable td { + font-family: monospace; + font-size: 120%; +} diff --git a/doc/go1.html b/doc/go1.html index 3d045459104..642f610b4b3 100644 --- a/doc/go1.html +++ b/doc/go1.html @@ -1,4 +1,9 @@ + +

Introduction to Go 1

@@ -33,13 +38,13 @@ thorough presentations elsewhere; such documents are linked below.

Close

-

Composite literals

+

Composite literals

-

Goroutines during init

+

Goroutines during init

The rune type

-

Deleting from maps

+

Deleting from maps

The original syntax for deleting an element in a map was: @@ -50,8 +55,7 @@ The original syntax for deleting an element in a map was:

-This syntax had a number of minor problems and is being replaced. -As of Go 1, that syntax is gone and in its place is a new built-in +In Go 1, that syntax has gone; instead there is a new built-in function, delete. The call

@@ -79,15 +83,94 @@ will flag other uses of the syntax for inspection by the programmer.

Returns and shadowed variables

-

Equality of structs and arrays

+

Equality of structs and arrays

Changes to the library

-

The package hierarchy

+

The package hierarchy

+ +

+Go 1 has a rearranged package hierarchy that groups related items +into subdirectories. For instance, utf8 and +utf16 now occupy subdirectories of unicode. +Also, some packages have moved into +subrepositories of +code.google.com/p/go +while others have been deleted outright. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old pathNew path
asn1 encoding/asn1 +
csv encoding/csv
gob encoding/gob
json encoding/json
xml encoding/xml

exp/template/html html/template

big math/big
cmath math/cmplx
rand math/rand

http net/http
http/cgi net/http/cgi
http/fcgi net/http/fcgi
http/httptest net/http/httptest
http/pprof net/http/pprof
mail net/mail
rpc net/rpc
rpc/jsonrpc net/rpc/jsonrpc
smtp net/smtp
url net/url

exec os/exec

scanner text/scanner
tabwriter text/tabwriter
template text/template
template/parse text/template/parse

utf8 unicode/utf8
utf16 unicode/utf16
+ +

+Note that the package names for the old cmath and +exp/template/html packages have changed to cmplx +and template. +

+ +

+Updating: +Gofix will update all imports and package renames for packages that +remain inside the standard repository. Programs that import packages +that are no longer in the standard repository will need to be edited +by hand. +TODO: should warn about deletions. +TODO: should also handle packages that move to subrepos. +

The error type

-

System call errors

+

System call errors

Time

@@ -101,9 +184,21 @@ will flag other uses of the syntax for inspection by the programmer.

The package tree old

-

Deleted packages

+

Deleted packages

-

Packages moving to subrepositories

+

Packages moving to subrepositories

+{{donotedit}}

Introduction to Go 1

@@ -33,13 +34,13 @@ thorough presentations elsewhere; such documents are linked below.

Close

-

Composite literals

+

Composite literals

-

Goroutines during init

+

Goroutines during init

The rune type

-

Deleting from maps

+

Deleting from maps

The original syntax for deleting an element in a map was: @@ -50,8 +51,7 @@ The original syntax for deleting an element in a map was:

-This syntax had a number of minor problems and is being replaced. -As of Go 1, that syntax is gone and in its place is a new built-in +In Go 1, that syntax has gone; instead there is a new built-in function, delete. The call

@@ -77,15 +77,94 @@ will flag other uses of the syntax for inspection by the programmer.

Returns and shadowed variables

-

Equality of structs and arrays

+

Equality of structs and arrays

Changes to the library

-

The package hierarchy

+

The package hierarchy

+ +

+Go 1 has a rearranged package hierarchy that groups related items +into subdirectories. For instance, utf8 and +utf16 now occupy subdirectories of unicode. +Also, some packages have moved into +subrepositories of +code.google.com/p/go +while others have been deleted outright. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old pathNew path
asn1 encoding/asn1
csv encoding/csv
gob encoding/gob
json encoding/json
xml encoding/xml

exp/template/html html/template

big math/big
cmath math/cmplx
rand math/rand

http net/http
http/cgi net/http/cgi
http/fcgi net/http/fcgi
http/httptest net/http/httptest
http/pprof net/http/pprof
mail net/mail
rpc net/rpc
rpc/jsonrpc net/rpc/jsonrpc
smtp net/smtp
url net/url

exec os/exec

scanner text/scanner
tabwriter text/tabwriter
template text/template
template/parse text/template/parse

utf8 unicode/utf8
utf16 unicode/utf16
+ +

+Note that the package names for the old cmath and +exp/template/html packages have changed to cmplx +and template. +

+ +

+Updating: +Gofix will update all imports and package renames for packages that +remain inside the standard repository. Programs that import packages +that are no longer in the standard repository will need to be edited +by hand. +TODO: should warn about deletions. +TODO: should also handle packages that move to subrepos. +

The error type

-

System call errors

+

System call errors

Time

@@ -99,9 +178,21 @@ will flag other uses of the syntax for inspection by the programmer.

The package tree old

-

Deleted packages

+

Deleted packages

-

Packages moving to subrepositories

+

Packages moving to subrepositories