]> Cypherpunks repositories - gostls13.git/commitdiff
doc: fix comments referring to removed API funcs
authorShenghou Ma <minux.ma@gmail.com>
Sat, 14 Jan 2012 18:59:45 +0000 (10:59 -0800)
committerRob Pike <r@golang.org>
Sat, 14 Jan 2012 18:59:45 +0000 (10:59 -0800)
        The strconv package has removed Atob, AtoF{64,32} and Ftoa.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5540057

src/pkg/exp/sql/driver/types.go
src/pkg/fmt/doc.go
src/pkg/math/all_test.go
src/pkg/strconv/fp_test.go

index 0ee278856d29edf85e24d5c42008f1f5eef9166c..d6ba641cb269e7bce0e79a05f16edd805953e8e5 100644 (file)
@@ -40,7 +40,7 @@ type ValueConverter interface {
 //       1 is true
 //       0 is false,
 //       other integers are an error
-//  - for strings and []byte, same rules as strconv.Atob
+//  - for strings and []byte, same rules as strconv.ParseBool
 //  - all other types are an error
 var Bool boolType
 
index 11e9f19f8995be1e5e119bf41107b312c9fad4b4..7d4178da768bc91609e367b77c227e251933bc06 100644 (file)
@@ -30,8 +30,9 @@
                %X      base 16, with upper-case letters for A-F
                %U      Unicode format: U+1234; same as "U+%04X"
        Floating-point and complex constituents:
-               %b      decimalless scientific notation with exponent a power
-                       of two, in the manner of strconv.Ftoa32, e.g. -123456p-78
+               %b      decimalless scientific notation with exponent a power of two, 
+                       in the manner of strconv.FormatFloat with the 'b' format, 
+                       e.g. -123456p-78
                %e      scientific notation, e.g. -1234.456e+78
                %E      scientific notation, e.g. -1234.456E+78
                %f      decimal point but no exponent, e.g. 123.456
index 2f73c062725ae87f4b557d146910a1016ba3cfe7..ed66a42fb0088b851b3ac29ca5e5233a705506f8 100644 (file)
@@ -2536,7 +2536,7 @@ func TestLargeTan(t *testing.T) {
 }
 
 // Check that math constants are accepted by compiler
-// and have right value (assumes strconv.Atof works).
+// and have right value (assumes strconv.ParseFloat works).
 // http://code.google.com/p/go/issues/detail?id=201
 
 type floatTest struct {
index 47877e373aaecc68c53a8897dabc6a1019999710..171defa4417ddfd09ff813a888ae81f4f38046db 100644 (file)
@@ -26,8 +26,8 @@ func pow2(i int) float64 {
        return pow2(i/2) * pow2(i-i/2)
 }
 
-// Wrapper around strconv.Atof64.  Handles dddddp+ddd (binary exponent)
-// itself, passes the rest on to strconv.Atof64.
+// Wrapper around strconv.ParseFloat(x, 64).  Handles dddddp+ddd (binary exponent)
+// itself, passes the rest on to strconv.ParseFloat.
 func myatof64(s string) (f float64, ok bool) {
        a := strings.SplitN(s, "p", 2)
        if len(a) == 2 {
@@ -70,8 +70,8 @@ func myatof64(s string) (f float64, ok bool) {
        return f1, true
 }
 
-// Wrapper around strconv.Atof32.  Handles dddddp+ddd (binary exponent)
-// itself, passes the rest on to strconv.Atof32.
+// Wrapper around strconv.ParseFloat(x, 32).  Handles dddddp+ddd (binary exponent)
+// itself, passes the rest on to strconv.ParseFloat.
 func myatof32(s string) (f float32, ok bool) {
        a := strings.SplitN(s, "p", 2)
        if len(a) == 2 {