mirror of
https://github.com/golang/go
synced 2024-11-22 05:04:40 -07:00
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
This commit is contained in:
parent
6b72b07016
commit
4cfa9e3c61
@ -40,7 +40,7 @@ type ValueConverter interface {
|
|||||||
// 1 is true
|
// 1 is true
|
||||||
// 0 is false,
|
// 0 is false,
|
||||||
// other integers are an error
|
// 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
|
// - all other types are an error
|
||||||
var Bool boolType
|
var Bool boolType
|
||||||
|
|
||||||
|
@ -30,8 +30,9 @@
|
|||||||
%X base 16, with upper-case letters for A-F
|
%X base 16, with upper-case letters for A-F
|
||||||
%U Unicode format: U+1234; same as "U+%04X"
|
%U Unicode format: U+1234; same as "U+%04X"
|
||||||
Floating-point and complex constituents:
|
Floating-point and complex constituents:
|
||||||
%b decimalless scientific notation with exponent a power
|
%b decimalless scientific notation with exponent a power of two,
|
||||||
of two, in the manner of strconv.Ftoa32, e.g. -123456p-78
|
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
|
||||||
%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
|
%f decimal point but no exponent, e.g. 123.456
|
||||||
|
@ -2536,7 +2536,7 @@ func TestLargeTan(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check that math constants are accepted by compiler
|
// 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
|
// http://code.google.com/p/go/issues/detail?id=201
|
||||||
|
|
||||||
type floatTest struct {
|
type floatTest struct {
|
||||||
|
@ -26,8 +26,8 @@ func pow2(i int) float64 {
|
|||||||
return pow2(i/2) * pow2(i-i/2)
|
return pow2(i/2) * pow2(i-i/2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper around strconv.Atof64. Handles dddddp+ddd (binary exponent)
|
// Wrapper around strconv.ParseFloat(x, 64). Handles dddddp+ddd (binary exponent)
|
||||||
// itself, passes the rest on to strconv.Atof64.
|
// itself, passes the rest on to strconv.ParseFloat.
|
||||||
func myatof64(s string) (f float64, ok bool) {
|
func myatof64(s string) (f float64, ok bool) {
|
||||||
a := strings.SplitN(s, "p", 2)
|
a := strings.SplitN(s, "p", 2)
|
||||||
if len(a) == 2 {
|
if len(a) == 2 {
|
||||||
@ -70,8 +70,8 @@ func myatof64(s string) (f float64, ok bool) {
|
|||||||
return f1, true
|
return f1, true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapper around strconv.Atof32. Handles dddddp+ddd (binary exponent)
|
// Wrapper around strconv.ParseFloat(x, 32). Handles dddddp+ddd (binary exponent)
|
||||||
// itself, passes the rest on to strconv.Atof32.
|
// itself, passes the rest on to strconv.ParseFloat.
|
||||||
func myatof32(s string) (f float32, ok bool) {
|
func myatof32(s string) (f float32, ok bool) {
|
||||||
a := strings.SplitN(s, "p", 2)
|
a := strings.SplitN(s, "p", 2)
|
||||||
if len(a) == 2 {
|
if len(a) == 2 {
|
||||||
|
Loading…
Reference in New Issue
Block a user