Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/slogPublic

Commit26f2029

Browse files
authored
chore: Remove IgnoreErrors check for test logger (#109)
1 parentc25eab1 commit26f2029

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

‎sloggers/slogtest/t.go‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ func (ts testSink) LogEntry(ctx context.Context, ent slog.SinkEntry) {
6161
ts.tb.Error(s)
6262
}
6363
caseslog.LevelFatal:
64-
ifts.opts.IgnoreErrors {
65-
panic("slogtest: cannot fatal in tests when IgnoreErrors option is set")
66-
}
6764
ts.tb.Fatal(s)
6865
}
6966
}

‎sloggers/slogtest/t_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestIgnoreErrors(t *testing.T) {
3939

4040
deferfunc() {
4141
recover()
42-
assert.Equal(t,"fatals",0,tb.fatals)
42+
assert.Equal(t,"fatals",1,tb.fatals)
4343
}()
4444

4545
l.Fatal(bg,"hello")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp