Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c12c9f1

Browse files
authored
chore(go.mod): update cdr.dev/slog (#7994)
* chore(mod): update cdr.dev/slog * fix: change uses of []slog.Field to []any to match new API
1 parent 74fdcb1 commit c12c9f1

File tree

6 files changed

+12
-121
lines changed

6 files changed

+12
-121
lines changed

coderd/csp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (api *API) logReportCSPViolations(rw http.ResponseWriter, r *http.Request)
3939
return
4040
}
4141

42-
fields := make([]slog.Field, 0, len(v.Report))
42+
fields := make([]any, 0, len(v.Report))
4343
for k, v := range v.Report {
4444
fields = append(fields, slog.F(k, v))
4545
}

enterprise/audit/backends/slog.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (b slogBackend) Export(ctx context.Context, alog database.AuditLog) error {
2828
// pleasantly format the output. For example, the clean result of
2929
// (*NullString).Value() may be printed instead of {String: "foo", Valid: true}.
3030
sfs := structs.Fields(alog)
31-
var fields []slog.Field
31+
var fields []any
3232
for _, sf := range sfs {
3333
fields = append(fields, slog.F(sf.Name(), sf.Value()))
3434
}

go.mod

+5-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ replace github.com/gliderlabs/ssh => github.com/coder/ssh v0.0.0-20230421140225-
5151
replace github.com/imulab/go-scim/pkg/v2 => github.com/coder/go-scim/pkg/v2 v2.0.0-20230221055123-1d63c1222136
5252

5353
require (
54-
cdr.dev/slog v1.5.3
54+
cdr.dev/slog v1.5.4
5555
cloud.google.com/go/compute/metadata v0.2.3
5656
github.com/AlecAivazis/survey/v2 v2.3.5
5757
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
@@ -352,12 +352,14 @@ require (
352352
inet.af/peercred v0.0.0-20210906144145-0893ea02156a // indirect
353353
)
354354

355-
require github.com/gobwas/httphead v0.1.0
355+
require (
356+
github.com/dave/dst v0.27.2
357+
github.com/gobwas/httphead v0.1.0
358+
)
356359

357360
require (
358361
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
359362
github.com/cloudflare/circl v1.3.3 // indirect
360-
github.com/dave/dst v0.27.2 // indirect
361363
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
362364
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect
363365
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect

0 commit comments

Comments
 (0)