- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for float64Value (0.18 sec)
-
src/log/slog/value_test.go
t.Errorf("got %q, want %q", got, want) } } func TestValueEqual(t *testing.T) { var x, y int vals := []Value{ {}, Int64Value(1), Int64Value(2), Float64Value(3.5), Float64Value(3.7), BoolValue(true), BoolValue(false), TimeValue(testTime), TimeValue(time.Time{}), TimeValue(time.Date(2001, 1, 2, 3, 4, 5, 0, time.UTC)),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:12:08 UTC 2024 - 6.9K bytes - Viewed (0) -
src/log/slog/value.go
} // Uint64Value returns a [Value] for a uint64. func Uint64Value(v uint64) Value { return Value{num: v, any: KindUint64} } // Float64Value returns a [Value] for a floating-point number. func Float64Value(v float64) Value { return Value{num: math.Float64bits(v), any: KindFloat64} } // BoolValue returns a [Value] for a bool. func BoolValue(v bool) Value { u := uint64(0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:12:08 UTC 2024 - 13.3K bytes - Viewed (0) -
src/flag/flag.go
// -- float64 Value type float64Value float64 func newFloat64Value(val float64, p *float64) *float64Value { *p = val return (*float64Value)(p) } func (f *float64Value) Set(s string) error { v, err := strconv.ParseFloat(s, 64) if err != nil { err = numError(err) } *f = float64Value(v) return err } func (f *float64Value) Get() any { return float64(*f) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 18:38:24 UTC 2024 - 39.7K bytes - Viewed (0) -
src/database/sql/convert_test.go
} if ct.wantf32 != 0 && ct.wantf32 != float32Value(ct.d) { errf("want float32 %v, got %v", ct.wantf32, float32Value(ct.d)) } if ct.wantf64 != 0 && ct.wantf64 != float64Value(ct.d) { errf("want float32 %v, got %v", ct.wantf64, float64Value(ct.d)) } if bp, boolTest := ct.d.(*bool); boolTest && *bp != ct.wantbool && ct.wanterr == "" { errf("want bool %v, got %v", ct.wantbool, *bp) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 10 20:23:22 UTC 2024 - 17K bytes - Viewed (0)