- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for upperCaseKey (1.11 sec)
-
src/log/slog/text_handler_test.go
{ "none", HandlerOptions{}, `time=2000-01-02T03:04:05.000Z level=INFO msg="a message"`, func(s string) string { return s }, }, { "replace", HandlerOptions{ReplaceAttr: upperCaseKey}, `TIME=2000-01-02T03:04:05.000Z LEVEL=INFO MSG="a message"`, strings.ToUpper, }, } { t.Run(opts.name, func(t *testing.T) { var buf bytes.Buffer h := NewTextHandler(&buf, &opts.opts)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 22 19:05:59 UTC 2023 - 3.8K bytes - Viewed (0) -
src/log/slog/handler_test.go
wantJSON: `{"time":"2000-01-02T03:04:05Z","level":"INFO","msg":"message","a":"one","b":2,"":"v"}`, }, { name: "cap keys", replace: upperCaseKey, attrs: attrs, wantText: "TIME=2000-01-02T03:04:05.000Z LEVEL=INFO MSG=message A=one B=2", wantJSON: `{"TIME":"2000-01-02T03:04:05Z","LEVEL":"INFO","MSG":"message","A":"one","B":2}`, }, {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 02 13:57:53 UTC 2023 - 19.6K bytes - Viewed (0) -
src/log/slog/json_handler_test.go
want string }{ { "none", HandlerOptions{}, `{"time":"2000-01-02T03:04:05Z","level":"INFO","msg":"m","a":1,"m":{"b":2}}`, }, { "replace", HandlerOptions{ReplaceAttr: upperCaseKey}, `{"TIME":"2000-01-02T03:04:05Z","LEVEL":"INFO","MSG":"m","A":1,"M":{"b":2}}`, }, } { t.Run(test.name, func(t *testing.T) { var buf bytes.Buffer h := NewJSONHandler(&buf, &test.opts)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 17:06:26 UTC 2023 - 6.5K bytes - Viewed (0)