Skip to content

Commit d953fea

Browse files
committed
chore: Update dependencies.
1 parent b98a59b commit d953fea

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/ctx42/logkit
22

33
go 1.24.0
44

5-
require github.com/ctx42/testing v0.38.0
5+
require github.com/ctx42/testing v0.46.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
github.com/ctx42/testing v0.38.0 h1:zv5lJ5jAC5tXwxr8jLqfs8t1bci6C82t6dFI3FFPskU=
22
github.com/ctx42/testing v0.38.0/go.mod h1:VHcxY4uhZQ8Lewevgmc9WHjJQc9CopJm9IAOTK5XbaM=
3+
github.com/ctx42/testing v0.46.0 h1:MgmuHhRjt2Hm8lb9lrKHsiWNi9fz18CljrKQ7/b8G5M=
4+
github.com/ctx42/testing v0.46.0/go.mod h1:VHcxY4uhZQ8Lewevgmc9WHjJQc9CopJm9IAOTK5XbaM=

pkg/logkit/all_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func init() { check.RegisterTypeChecker(Entry{}, EntryCheck) }
2323
func EntryCheck(want, have any, opts ...any) error {
2424
ops := check.DefaultOptions(opts...)
2525
stOpt := check.WithOptions(ops)
26-
if err := check.SameType(Entry{}, have, stOpt); err != nil {
26+
if _, err := check.SameType(Entry{}, have, stOpt); err != nil {
2727
return err
2828
}
2929
w, h := want.(Entry), have.(Entry)

pkg/logkit/has.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func HasBool(ent Entry, field string) (bool, error) {
2424
Remove("key").
2525
Wrap(ErrMissing)
2626
}
27-
if err = check.SameType(true, val); err != nil {
27+
if _, err = check.SameType(true, val); err != nil {
2828
return false, notice.From(err, "log entry").
2929
Prepend("field", "%s", field).
3030
Wrap(ErrType)
@@ -46,7 +46,7 @@ func HasStr(ent Entry, field string) (string, error) {
4646
Remove("key").
4747
Wrap(ErrMissing)
4848
}
49-
if err = check.SameType("", val); err != nil {
49+
if _, err = check.SameType("", val); err != nil {
5050
return "", notice.From(err, "log entry").
5151
Prepend("field", "%s", field).
5252
Wrap(ErrType)
@@ -71,7 +71,7 @@ func HasTime(ent Entry, field string) (time.Time, error) {
7171
Remove("key").
7272
Wrap(ErrMissing)
7373
}
74-
if err = check.SameType("", val); err != nil {
74+
if _, err = check.SameType("", val); err != nil {
7575
return time.Time{}, notice.From(err, "log entry").
7676
Prepend("field", "%s", field).
7777
Wrap(ErrType)
@@ -103,7 +103,7 @@ func HasDur(ent Entry, field string) (time.Duration, error) {
103103
Remove("key").
104104
Wrap(ErrMissing)
105105
}
106-
if err = check.SameType(1.1, val); err != nil {
106+
if _, err = check.SameType(1.1, val); err != nil {
107107
return 0, notice.From(err, "log entry").
108108
Prepend("field", "%s", field).
109109
Wrap(ErrType)
@@ -127,7 +127,7 @@ func HasNum(ent Entry, field string) (float64, error) {
127127
Remove("key").
128128
Wrap(ErrMissing)
129129
}
130-
if err = check.SameType(1.1, val); err != nil {
130+
if _, err = check.SameType(1.1, val); err != nil {
131131
return 0, notice.From(err, "log entry").
132132
Prepend("field", "%s", field).
133133
Wrap(ErrType)
@@ -148,7 +148,7 @@ func HasMap(ent Entry, field string) (map[string]any, error) {
148148
Remove("key").
149149
Wrap(ErrMissing)
150150
}
151-
if err = check.SameType(map[string]any{}, val); err != nil {
151+
if _, err = check.SameType(map[string]any{}, val); err != nil {
152152
return nil, notice.From(err, "log entry").
153153
Prepend("field", "%s", field).
154154
Wrap(ErrType)

0 commit comments

Comments
 (0)