Skip to content

Commit

Permalink
📝 chore: update deps,README and update GitHub action config
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 29, 2023
1 parent 5047b62 commit f81659d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version: [1.19, 1.18, '1.20']
go_version: [1.21, 1.19, '1.20']
os: [ubuntu-latest, windows-latest] # , macOS-latest

steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Above is the `Formatter` setting that changed the default logger.
```go
h := handler.NewConsoleHandler(slog.AllLevels)
l := slog.NewWithHandlers()
l := slog.NewWithHandlers(h)

l.Trace("this is a simple log message")
l.Debug("this is a simple log message")
Expand All @@ -137,7 +137,7 @@ l.Debug("this is a simple log message")
Change the default logger log output style:

```go
h.GetFormatter().(*slog.TextFormatter).SetTemplate(slog.NamedTemplate)
h.Formatter().(*slog.TextFormatter).SetTemplate(slog.NamedTemplate)
```

**Output:**
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func main() {
```go
h := handler.NewConsoleHandler(slog.AllLevels)
l := slog.NewWithHandlers()
l := slog.NewWithHandlers(h)

l.Trace("this is a simple log message")
l.Debug("this is a simple log message")
Expand All @@ -137,7 +137,7 @@ l.Debug("this is a simple log message")
更改默认的logger日志输出样式:

```go
h.GetFormatter().(*slog.TextFormatter).SetTemplate(slog.NamedTemplate)
h.Formatter().(*slog.TextFormatter).SetTemplate(slog.NamedTemplate)
```

**输出预览:**
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/gookit/slog

go 1.18
go 1.19

require (
github.com/gookit/color v1.5.4
github.com/gookit/goutil v0.6.12
github.com/gookit/goutil v0.6.14
github.com/gookit/gsr v0.1.0
github.com/valyala/bytebufferpool v1.0.0
)
Expand Down

0 comments on commit f81659d

Please sign in to comment.