promql/parse.go
func (p *parser) number(val string) float64 {
	n, err := strconv.ParseInt(val, 0, 64)
	f := float64(n)
	if err != nil {
		f, err = strconv.ParseFloat(val, 64)
	}
	if err != nil {
		p.errorf("error parsing number: %s", err)
	}
	return f
}
func (p *parser) number(val string) float64 {
	n, err := strconv.ParseInt(val, 0, 64)
	f := float64(n)
	if err != nil {
		f, err = strconv.ParseFloat(val, 64)
	}
	if err != nil {
		p.errorf("error parsing number: %s", err)
	}
	return f
}
func ( p * parser ) number ( val string ) float64 { n , err := strconv . ParseInt ( val , 0 , 64 ) f := float64 ( n ) if err != nil { f , err = strconv . ParseFloat ( val , 64 ) } if err != nil { p . errorf ( " " , err ) } return f }
// number parses a number.
number parses a number .