ParseDFloat parses and returns the *DFloat Datum value represented by the provided string, or an error if parsing is unsuccessful.
(s string)
| 837 | // ParseDFloat parses and returns the *DFloat Datum value represented by the provided |
| 838 | // string, or an error if parsing is unsuccessful. |
| 839 | func ParseDFloat(s string) (*DFloat, error) { |
| 840 | f, err := strconv.ParseFloat(s, 64) |
| 841 | if err != nil { |
| 842 | return nil, MakeParseError(s, types.Float, err) |
| 843 | } |
| 844 | return NewDFloat(DFloat(f)), nil |
| 845 | } |
| 846 | |
| 847 | // ResolvedType implements the TypedExpr interface. |
| 848 | func (*DFloat) ResolvedType() *types.T { |
no test coverage detected
searching dependent graphs…