Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for float64Value (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
Back to top