diff --git a/doc/go1.html b/doc/go1.html index 1472cb3f54..ae9ea28340 100644 --- a/doc/go1.html +++ b/doc/go1.html @@ -478,6 +478,9 @@ while others have been deleted outright.
+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.
+