From 71ccf73a74fdbc68f5449b1e2c94cc58e2886fbc Mon Sep 17 00:00:00 2001
From: Rob Pike Old path
New path
+
+
+asn1 encoding/asn1 csv encoding/csv
@@ -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.
+gob encoding/gob
+TODO: gofix should warn about deletions.
+
+TODO: gofix should also handle packages that move to subrepos.
+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.
+
+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 call | +New 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.
+
+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.
+
+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 call | +New 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.
+