- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for float64Value (0.23 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) -
src/log/slog/attr.go
func Uint64(key string, v uint64) Attr { return Attr{key, Uint64Value(v)} } // Float64 returns an Attr for a floating-point number. func Float64(key string, v float64) Attr { return Attr{key, Float64Value(v)} } // Bool returns an Attr for a bool. func Bool(key string, v bool) Attr { return Attr{key, BoolValue(v)} } // Time returns an Attr for a [time.Time]. // It discards the monotonic portion.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 18:23:25 UTC 2024 - 2.5K bytes - Viewed (0) -
src/log/slog/value_access_benchmark_test.go
func BenchmarkDispatch(b *testing.B) { vs := []Value{ Int64Value(32768), Uint64Value(0xfacecafe), StringValue("anything"), BoolValue(true), Float64Value(1.2345), DurationValue(time.Second), AnyValue(b), } var ( ii int64 s string bb bool u uint64 d time.Duration f float64 a any )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 21 20:55:33 UTC 2023 - 4.3K bytes - Viewed (0) -
api/go1.21.txt
pkg log/slog, func ErrorContext(context.Context, string, ...interface{}) #61200 pkg log/slog, func Error(string, ...interface{}) #56345 pkg log/slog, func Float64(string, float64) Attr #56345 pkg log/slog, func Float64Value(float64) Value #56345 pkg log/slog, func Group(string, ...interface{}) Attr #59204 pkg log/slog, func GroupValue(...Attr) Value #56345 pkg log/slog, func InfoContext(context.Context, string, ...interface{}) #61200
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 09:39:17 UTC 2023 - 25.6K bytes - Viewed (0) -
src/fmt/scan.go
} func hasX(s string) bool { for i := 0; i < len(s); i++ { if s[i] == 'x' || s[i] == 'X' { return true } } return false } // convertFloat converts the string to a float64value. func (s *ss) convertFloat(str string, n int) float64 { // strconv.ParseFloat will handle "+0x1.fp+2", // but we have to implement our non-standard // decimal+binary exponent mix (1.2p4) ourselves.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 31.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"DebugContext", Func, 21}, {"Default", Func, 21}, {"Duration", Func, 21}, {"DurationValue", Func, 21}, {"Error", Func, 21}, {"ErrorContext", Func, 21}, {"Float64", Func, 21}, {"Float64Value", Func, 21}, {"Group", Func, 21}, {"GroupValue", Func, 21}, {"Handler", Type, 21}, {"HandlerOptions", Type, 21}, {"HandlerOptions.AddSource", Field, 21}, {"HandlerOptions.Level", Field, 21},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)