Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for KindTime (0.25 sec)

  1. src/log/slog/value.go

    type Value struct {
    	_ [0]func() // disallow ==
    	// num holds the value for Kinds Int64, Uint64, Float64, Bool and Duration,
    	// the string length for KindString, and nanoseconds since the epoch for KindTime.
    	num uint64
    	// If any is of type Kind, then the value is in num as described above.
    	// If any is of type *time.Location, then the Kind is Time and time.Time value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. src/log/slog/text_handler.go

    	return h.commonHandler.handle(r)
    }
    
    func appendTextValue(s *handleState, v Value) error {
    	switch v.Kind() {
    	case KindString:
    		s.appendString(v.str())
    	case KindTime:
    		s.appendTime(v.time())
    	case KindAny:
    		if tm, ok := v.any.(encoding.TextMarshaler); ok {
    			data, err := tm.MarshalText()
    			if err != nil {
    				return err
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 22:56:07 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. src/log/slog/json_handler.go

    			return err
    		}
    	case KindBool:
    		*s.buf = strconv.AppendBool(*s.buf, v.Bool())
    	case KindDuration:
    		// Do what json.Marshal does.
    		*s.buf = strconv.AppendInt(*s.buf, int64(v.Duration()), 10)
    	case KindTime:
    		s.appendTime(v.Time())
    	case KindAny:
    		a := v.Any()
    		_, jm := a.(json.Marshaler)
    		if err, ok := a.(error); ok && !jm {
    			s.appendString(err.Error())
    		} else {
    			return appendJSONMarshal(s.buf, a)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"KindDuration", Const, 21},
    		{"KindFloat64", Const, 21},
    		{"KindGroup", Const, 21},
    		{"KindInt64", Const, 21},
    		{"KindLogValuer", Const, 21},
    		{"KindString", Const, 21},
    		{"KindTime", Const, 21},
    		{"KindUint64", Const, 21},
    		{"Level", Type, 21},
    		{"LevelDebug", Const, 21},
    		{"LevelError", Const, 21},
    		{"LevelInfo", Const, 21},
    		{"LevelKey", Const, 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)
Back to top