Source File
jsonfloat.go
Belonging Package
google.golang.org/api/internal/gensupport
package gensupport
import (
)
type JSONFloat64 float64
func ( *JSONFloat64) ( []byte) error {
var float64
if := json.Unmarshal(, &); == nil {
* = JSONFloat64()
return nil
}
var string
if := json.Unmarshal(, &); == nil {
switch {
case "NaN":
= math.NaN()
case "Infinity":
= math.Inf(1)
case "-Infinity":
= math.Inf(-1)
default:
return fmt.Errorf("google.golang.org/api/internal: bad float string %q", )
}
* = JSONFloat64()
return nil
}
return errors.New("google.golang.org/api/internal: data not float or string")
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |