diff --git a/doc/go1.html b/doc/go1.html index 1472cb3f547..ae9ea283401 100644 --- a/doc/go1.html +++ b/doc/go1.html @@ -478,6 +478,9 @@ while others have been deleted outright. Old path New path + +
+ asn1 encoding/asn1 csv encoding/csv gob encoding/gob @@ -536,14 +539,33 @@ 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. +
+TODO: gofix should warn about deletions. +
+TODO: gofix should also handle packages that move to subrepos.

-

The error type

+

The error type and errors package

System call errors

+

+In Go 1, the +syscall +package returns an error for system call errors, +rather than plain integer errno values. +On Unix, the implementation is done by a +syscall.Errno type +that satisfies error and replaces the old os.Errno. +

+ +

+Updating: +Gofix will update almost all code affected by the change. +Regardless, most code should use the os package +rather than syscall and so will be unaffected. +

+

Time

The html package

@@ -552,6 +574,98 @@ by hand.

The strconv package

+

+In Go 1, the +strconv +package has been significantly reworked to make it more Go-like and less C-like, +although Atoi lives on (it's similar to +int(ParseInt(x, 10, 0)), as does +Itoa(x) (FormatInt(int64(x), 10)). +There are also new variants of some of the functions that append to byte slices rather than +return strings, to allow control over allocation. +

+ +

+This table summarizes the renamings; see the +package documentation +for full details. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old callNew call

Atob(x) ParseBool(x)

Atof32(x) ParseFloat(x, 32)§
Atof64(x) ParseFloat(x, 64)
AtofN(x, n) ParseFloat(x, n)

Atoi(x) Atoi(x)
Atoi(x) ParseInt(x, 10, 0)§
Atoi64(x) ParseInt(x, 10, 64)

Atoui(x) ParseUint(x, 10, 0)§
Atoi64(x) ParseInt(x, 10, 64)

Btoi64(x, b) ParseInt(x, b, 64)
Btoui64(x, b) ParseUint(x, b, 64)

Btoa(x) FormatBool(x)

Ftoa32(x, f, p) FormatFloat(x, float64(f), p, 32)
Ftoa64(x, f, p) FormatFloat(x, f, p, 64)
FtoaN(x, f, p, n) FormatFloat(x, f, p, n)

Itoa(x) Itoa(x)
Itoa(x) FormatInt(int64(x), 10)
Itoa64(x) FormatInt(x, 10)

Itob(x, b) FormatInt(int64(x), b)
Itob64(x, b) FormatInt(x, b)

Uitoa(x) FormatUint(uint64(x), 10)
Uitoa64(x) FormatUint(x, 10)

Uitob(x, b) FormatUint(uint64(x), b)
Uitob64(x, b) FormatUint(x, b)
+ +

+Updating: +Gofix will update almost all code affected by the change. +
Atoi persists but Atoui and Atof32 do not, so +they may require +a cast that must be added by hand; gofix will warn about it. +

+

The package tree exp

The package tree old

diff --git a/doc/go1.tmpl b/doc/go1.tmpl index 04e72dfab24..2d1c2948a23 100644 --- a/doc/go1.tmpl +++ b/doc/go1.tmpl @@ -393,6 +393,9 @@ while others have been deleted outright. Old path New path + +
+ asn1 encoding/asn1 csv encoding/csv gob encoding/gob @@ -451,14 +454,33 @@ 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. +
+TODO: gofix should warn about deletions. +
+TODO: gofix should also handle packages that move to subrepos.

-

The error type

+

The error type and errors package

System call errors

+

+In Go 1, the +syscall +package returns an error for system call errors, +rather than plain integer errno values. +On Unix, the implementation is done by a +syscall.Errno type +that satisfies error and replaces the old os.Errno. +

+ +

+Updating: +Gofix will update almost all code affected by the change. +Regardless, most code should use the os package +rather than syscall and so will be unaffected. +

+

Time

The html package

@@ -467,6 +489,98 @@ by hand.

The strconv package

+

+In Go 1, the +strconv +package has been significantly reworked to make it more Go-like and less C-like, +although Atoi lives on (it's similar to +int(ParseInt(x, 10, 0)), as does +Itoa(x) (FormatInt(int64(x), 10)). +There are also new variants of some of the functions that append to byte slices rather than +return strings, to allow control over allocation. +

+ +

+This table summarizes the renamings; see the +package documentation +for full details. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old callNew call

Atob(x) ParseBool(x)

Atof32(x) ParseFloat(x, 32)§
Atof64(x) ParseFloat(x, 64)
AtofN(x, n) ParseFloat(x, n)

Atoi(x) Atoi(x)
Atoi(x) ParseInt(x, 10, 0)§
Atoi64(x) ParseInt(x, 10, 64)

Atoui(x) ParseUint(x, 10, 0)§
Atoi64(x) ParseInt(x, 10, 64)

Btoi64(x, b) ParseInt(x, b, 64)
Btoui64(x, b) ParseUint(x, b, 64)

Btoa(x) FormatBool(x)

Ftoa32(x, f, p) FormatFloat(x, float64(f), p, 32)
Ftoa64(x, f, p) FormatFloat(x, f, p, 64)
FtoaN(x, f, p, n) FormatFloat(x, f, p, n)

Itoa(x) Itoa(x)
Itoa(x) FormatInt(int64(x), 10)
Itoa64(x) FormatInt(x, 10)

Itob(x, b) FormatInt(int64(x), b)
Itob64(x, b) FormatInt(x, b)

Uitoa(x) FormatUint(uint64(x), 10)
Uitoa64(x) FormatUint(x, 10)

Uitob(x, b) FormatUint(uint64(x), b)
Uitob64(x, b) FormatUint(x, b)
+ +

+Updating: +Gofix will update almost all code affected by the change. +
Atoi persists but Atoui and Atof32 do not, so +they may require +a cast that must be added by hand; gofix will warn about it. +

+

The package tree exp

The package tree old