Skip to content

Commit

Permalink
Merge pull request #2 from neilotoole/chore/go1.21
Browse files Browse the repository at this point in the history
go1.21: slog is in stdlib
  • Loading branch information
neilotoole authored Aug 12, 2023
2 parents d99b64e + aa45b34 commit d2d32c9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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`,
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions slogt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import (
"bytes"
"context"
"io"
"log/slog"
"sync"
"testing"

"golang.org/x/exp/slog"
)

var _ slog.Handler = (*Bridge)(nil)
Expand Down
3 changes: 1 addition & 2 deletions slogt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit d2d32c9

Please sign in to comment.