diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d72403c..9bf6a24 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: "1.20.2" + go-version: "1.21.0" - name: Build run: go build -v ./... diff --git a/README.md b/README.md index a18dcb3..1ca4757 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # slogt `slogt` is a bridge between Go stdlib [`testing`](https://pkg.go.dev/testing) pkg -and [`golang.org/x/exp/slog`](https://pkg.go.dev/golang.org/x/exp/slog). +and [`log/slog`](https://pkg.go.dev/golang.org/log/slog). The problem: when tests execute, your `slog` output goes directly to `stdout`, diff --git a/go.mod b/go.mod index a8c909f..c95f0a7 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,4 @@ module github.com/neilotoole/slogt -go 1.20 +go 1.21 -require golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 diff --git a/slogt.go b/slogt.go index e731e06..bb56052 100644 --- a/slogt.go +++ b/slogt.go @@ -6,10 +6,9 @@ import ( "bytes" "context" "io" + "log/slog" "sync" "testing" - - "golang.org/x/exp/slog" ) var _ slog.Handler = (*Bridge)(nil) diff --git a/slogt_test.go b/slogt_test.go index bfd920d..a930571 100644 --- a/slogt_test.go +++ b/slogt_test.go @@ -2,14 +2,13 @@ package slogt_test import ( "io" + "log/slog" "os" "strconv" "testing" "time" "github.com/neilotoole/slogt" - - "golang.org/x/exp/slog" ) const (