Skip to content

Commit

Permalink
fix errors dep + tests (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Karn authored Aug 17, 2023
1 parent 52f7e47 commit 10609b0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [8.1.2] - 2023-08-16
### Fixed
- errors dependency which contains fixes for wrapped/wrapping errors.

## [8.1.1] - 2023-08-16
### Fixed
- errors.Link output in error function after updating dependency.
Expand Down Expand Up @@ -46,8 +50,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed ability to remove individual log levels externally; RemoveHandler+AddHandler can do the same.


[Unreleased]: https://github.com/go-playground/log/compare/v8.1.1...HEAD
[8.1.1]: https://github.com/go-playground/log/compare/v8.1.1...v8.1.1
[Unreleased]: https://github.com/go-playground/log/compare/v8.1.2...HEAD
[8.1.2]: https://github.com/go-playground/log/compare/v8.1.1...v8.1.2
[8.1.1]: https://github.com/go-playground/log/compare/v8.1.0...v8.1.1
[8.1.0]: https://github.com/go-playground/log/compare/v8.0.2...v8.1.0
[8.0.2]: https://github.com/go-playground/log/compare/v8.0.1...v8.0.2
[8.0.1]: https://github.com/go-playground/log/compare/v8.0.0...v8.0.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## log
<img align="center" src="https://raw.githubusercontent.com/go-playground/log/master/logo.png">![Project status](https://img.shields.io/badge/version-8.1.1-green.svg)
<img align="center" src="https://raw.githubusercontent.com/go-playground/log/master/logo.png">![Project status](https://img.shields.io/badge/version-8.1.2-green.svg)
[![Test](https://github.com/go-playground/log/actions/workflows/go.yml/badge.svg)](https://github.com/go-playground/log/actions/workflows/go.yml)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/log/badge.svg?branch=master)](https://coveralls.io/github/go-playground/log?branch=master)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/log)](https://goreportcard.com/report/github.com/go-playground/log)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/go-playground/log/v8
go 1.18

require (
github.com/go-playground/errors/v5 v5.3.2
github.com/go-playground/errors/v5 v5.3.3
github.com/go-playground/pkg/v5 v5.21.2
golang.org/x/term v0.11.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/go-playground/errors/v5 v5.3.2 h1:B3fsF2CAUrc9XI6L95MtEs20qC5q5tPEFgNBGDwhZMc=
github.com/go-playground/errors/v5 v5.3.2/go.mod h1:LcLhmzQ/RuEntAs9r38NSV+xtbHffhMx/1yuuEroc7M=
github.com/go-playground/errors/v5 v5.3.3 h1:/ojXdkJFmw7CVdGvwQnIUULahAyi89T8PSKgoQDbLeA=
github.com/go-playground/errors/v5 v5.3.3/go.mod h1:LcLhmzQ/RuEntAs9r38NSV+xtbHffhMx/1yuuEroc7M=
github.com/go-playground/pkg/v5 v5.21.2 h1:DgVr88oMI3pfMFkEN9E6hp9YGG8NHc+019LRJfnUOfU=
github.com/go-playground/pkg/v5 v5.21.2/go.mod h1:UgHNntEQnMJSygw2O2RQ3LAB0tprx81K90c/pOKh7cU=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
Expand Down
4 changes: 2 additions & 2 deletions log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func TestWithError(t *testing.T) {
}
buff.Reset()
WithError(errors.Wrap(terr, "wrapped error")).Info()
if !strings.HasSuffix(buff.String(), "log_test.go:371:TestWithError wrapped error: this is an err\n") || !strings.HasPrefix(buff.String(), "INFO source=") {
if !strings.HasSuffix(buff.String(), "log_test.go:371:TestWithError wrapped error\n") || !strings.HasPrefix(buff.String(), "INFO source=") {
t.Errorf("Expected '%s' Got '%s'", "log_test.go:371:TestWithError wrapped error: this is an err\n", buff.String())
}
}
Expand Down Expand Up @@ -992,7 +992,7 @@ func TestWrappedError(t *testing.T) {
err := fmt.Errorf("this is an %s", "error")
err = errors.Wrap(err, "prefix").AddTypes("Permanent", "Internal").AddTag("key", "value")
WithError(err).Error("test")
expected := "log_test.go:993:TestWrappedError prefix: this is an error key=value types=Permanent,Internal\n"
expected := "log_test.go:993:TestWrappedError prefix key=value types=Permanent,Internal\n"
if !strings.HasSuffix(buff.String(), expected) {
t.Errorf("got %s Expected %s", buff.String(), expected)
}
Expand Down

0 comments on commit 10609b0

Please sign in to comment.