- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for handleStats (0.34 sec)
-
src/log/slog/json_handler.go
func (h *JSONHandler) Handle(_ context.Context, r Record) error { return h.commonHandler.handle(r) } // Adapted from time.Time.MarshalJSON to avoid allocation. func appendJSONTime(s *handleState, t time.Time) { if y := t.Year(); y < 0 || y >= 10000 { // RFC 3339 is clear that years are 4 digits exactly. // See golang.org/issue/4556#c15 for more discussion.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 16:18:11 UTC 2023 - 8.1K bytes - Viewed (0) -
src/log/slog/text_handler.go
// // Each call to Handle results in a single serialized call to // io.Writer.Write. func (h *TextHandler) Handle(_ context.Context, r Record) error { 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 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 23 22:56:07 UTC 2023 - 4.7K bytes - Viewed (0) -
src/log/slog/json_handler_test.go
if got != test.want { t.Errorf("%v: got %s, want %s", test.value, got, test.want) } } } func jsonValueString(v Value) string { var buf []byte s := &handleState{h: &commonHandler{json: true}, buf: (*buffer.Buffer)(&buf)} if err := appendJSONValue(s, v); err != nil { s.appendError(err) } return string(buf) } func BenchmarkJSONHandler(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 17:06:26 UTC 2023 - 6.5K bytes - Viewed (0)