diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2012-01-14 10:59:45 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2012-01-14 10:59:45 -0800 |
commit | 4cfa9e3c616ee9ffd688adc7caffa76bfd7ee312 (patch) | |
tree | 5b5d3c357062eb84a082ebcde5ff66c06b5c0010 | |
parent | 6b72b070166c94f386cdaeea7bc762cdcf277bd3 (diff) | |
download | go-4cfa9e3c616ee9ffd688adc7caffa76bfd7ee312.tar.gz go-4cfa9e3c616ee9ffd688adc7caffa76bfd7ee312.zip |
doc: fix comments referring to removed API funcs
The strconv package has removed Atob, AtoF{64,32} and Ftoa.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5540057
-rw-r--r-- | src/pkg/exp/sql/driver/types.go | 2 | ||||
-rw-r--r-- | src/pkg/fmt/doc.go | 5 | ||||
-rw-r--r-- | src/pkg/math/all_test.go | 2 | ||||
-rw-r--r-- | src/pkg/strconv/fp_test.go | 8 |
4 files changed, 9 insertions, 8 deletions
diff --git a/src/pkg/exp/sql/driver/types.go b/src/pkg/exp/sql/driver/types.go index 0ee278856d..d6ba641cb2 100644 --- a/src/pkg/exp/sql/driver/types.go +++ b/src/pkg/exp/sql/driver/types.go @@ -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 diff --git a/src/pkg/fmt/doc.go b/src/pkg/fmt/doc.go index 11e9f19f89..7d4178da76 100644 --- a/src/pkg/fmt/doc.go +++ b/src/pkg/fmt/doc.go @@ -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 diff --git a/src/pkg/math/all_test.go b/src/pkg/math/all_test.go index 2f73c06272..ed66a42fb0 100644 --- a/src/pkg/math/all_test.go +++ b/src/pkg/math/all_test.go @@ -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 { diff --git a/src/pkg/strconv/fp_test.go b/src/pkg/strconv/fp_test.go index 47877e373a..171defa441 100644 --- a/src/pkg/strconv/fp_test.go +++ b/src/pkg/strconv/fp_test.go @@ -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 { |