- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 930 for sloc (2.3 sec)
-
src/log/slog/slogtest_test.go
"encoding/json" "fmt" "io" "log/slog" "strings" "testing" "testing/slogtest" ) func TestSlogtest(t *testing.T) { for _, test := range []struct { name string new func(io.Writer) slog.Handler parse func([]byte) (map[string]any, error) }{ {"JSON", func(w io.Writer) slog.Handler { return slog.NewJSONHandler(w, nil) }, parseJSON},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 10 12:50:22 UTC 2023 - 2.6K bytes - Viewed (0) -
src/testing/slogtest/slogtest.go
l.Info("msg", "a", "b", slog.Group("G", slog.String("c", "d")), "e", "f") }, checks: []check{ hasAttr("a", "b"), inGroup("G", hasAttr("c", "d")), hasAttr("e", "f"), }, }, { name: "empty-group", explanation: withSource("a Handler should ignore an empty group"), f: func(l *slog.Logger) { l.Info("msg", "a", "b", slog.Group("G"), "e", "f") }, checks: []check{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 9.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/shortcircuit_test.go
Goto("b3")), Bloc("b3", Valu("phi2", OpPhi, c.config.Types.Bool, 0, nil, "cmp1", "cmp2"), If("phi2", "b4", "b5")), Bloc("b4", Valu("cmp3", OpLess64, c.config.Types.Bool, 0, nil, "arg3", "arg1"), Goto("b5")), Bloc("b5", Valu("phi3", OpPhi, c.config.Types.Bool, 0, nil, "phi2", "cmp3"), If("phi3", "b6", "b7")), Bloc("b6", Exit("mem")), Bloc("b7", Exit("mem")))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 23:01:51 UTC 2017 - 1.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/deadstore_test.go
c := testConfig(t) ptrType := c.config.Types.BytePtr fun := c.Fun("entry", Bloc("entry", Valu("start", OpInitMem, types.TypeMem, 0, nil), Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil), Valu("v", OpConstBool, c.config.Types.Bool, 1, nil), Valu("addr", OpAddr, ptrType, 0, nil, "sb"), Goto("loop")), Bloc("loop", Valu("phi", OpPhi, types.TypeMem, 0, nil, "start", "store"),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 25 20:07:26 UTC 2024 - 5.6K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/helper/QueryHelperTest.java
Registered: Wed Jun 12 13:08:18 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 37.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/nilcheck_test.go
fun := c.Fun("entry", Bloc("entry", Valu("mem", OpInitMem, types.TypeMem, 0, nil), Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil), Goto("checkPtr")), Bloc("checkPtr", Valu("ptr1", OpAddr, ptrType, 0, nil, "sb"), Valu("bool1", OpIsNonNil, c.config.Types.Bool, 0, nil, "ptr1"), If("bool1", "extra", "exit")), Bloc("extra", Goto("exit")), Bloc("exit", Exit("mem")))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 12.3K bytes - Viewed (0) -
src/log/slog/doc.go
a global LevelVar: var programLevel = new(slog.LevelVar) // Info by default Then use the LevelVar to construct a handler, and make it the default: h := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel}) slog.SetDefault(slog.New(h)) Now the program can change its logging level with a single statement: programLevel.Set(slog.LevelDebug) # Groups
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 15 14:35:48 UTC 2024 - 12.3K bytes - Viewed (0) -
src/internal/coverage/pkid.go
// registered list: // slot: 0 path='internal/cpu' hard-coded id: 1 // slot: 1 path='internal/goarch' hard-coded id: 2 // slot: 2 path='internal/runtime/atomic' hard-coded id: 3 // slot: 3 path='internal/goos' // slot: 4 path='runtime/internal/sys' hard-coded id: 5 // slot: 5 path='internal/abi' hard-coded id: 4 // slot: 6 path='runtime/internal/math' hard-coded id: 6
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 3.1K bytes - Viewed (0) -
src/log/slog/example_logvaluer_secret_test.go
// license that can be found in the LICENSE file. package slog_test import ( "log/slog" "log/slog/internal/slogtest" "os" ) // A token is a secret value that grants permissions. type Token string // LogValue implements slog.LogValuer. // It avoids revealing the token. func (Token) LogValue() slog.Value { return slog.StringValue("REDACTED_TOKEN") } // This example demonstrates a Value that replaces itself
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 906 bytes - Viewed (0) -
src/testing/slogtest/run_test.go
// license that can be found in the LICENSE file. package slogtest_test import ( "bytes" "encoding/json" "log/slog" "testing" "testing/slogtest" ) func TestRun(t *testing.T) { var buf bytes.Buffer newHandler := func(*testing.T) slog.Handler { buf.Reset() return slog.NewJSONHandler(&buf, nil) } result := func(t *testing.T) map[string]any { m := map[string]any{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 20:37:12 UTC 2023 - 623 bytes - Viewed (0)