Skip to content

Commit

Permalink
correct Link Error output missing err when prefix not set (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
deankarn committed Aug 16, 2023
1 parent 81fde8d commit 2ff27f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.3.1] - 2023-08-16
## [5.3.2] - 2023-08-16
### Fixed
- Link Error output missing error when prefix was blank.

## [5.3.1] - 2023-08-15
### Fixed
- Wrap recursively wrapping the Chain itself instead of only adding another Link.

Expand Down Expand Up @@ -37,7 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated deps.


[Unreleased]: https://github.com/go-playground/errors/compare/v5.3.1...HEAD
[Unreleased]: https://github.com/go-playground/errors/compare/v5.3.2...HEAD
[5.3.2]: https://github.com/go-playground/errors/compare/v5.3.1...v5.3.2
[5.3.1]: https://github.com/go-playground/errors/compare/v5.3.0...v5.3.1
[5.3.0]: https://github.com/go-playground/errors/compare/v5.2.3...v5.3.0
[5.2.3]: https://github.com/go-playground/errors/compare/v5.2.2...v5.2.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package errors
============
![Project status](https://img.shields.io/badge/version-5.3.1-green.svg)
![Project status](https://img.shields.io/badge/version-5.3.2-green.svg)
[![Build Status](https://travis-ci.org/go-playground/errors.svg?branch=master)](https://travis-ci.org/go-playground/errors)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-playground/errors)](https://goreportcard.com/report/github.com/go-playground/errors)
[![GoDoc](https://godoc.org/github.com/go-playground/errors?status.svg)](https://pkg.go.dev/github.com/go-playground/errors/v5)
Expand Down
6 changes: 4 additions & 2 deletions chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ func (l *Link) formatError(b []byte) []byte {

if l.Prefix != "" {
b = append(b, l.Prefix...)
}

if l.Err != nil {
if l.Err != nil {
if l.Prefix != "" {
b = append(b, ": "...)
b = append(b, l.Err.Error()...)
}
b = append(b, l.Err.Error()...)
}

for _, tag := range l.Tags {
Expand Down

0 comments on commit 2ff27f9

Please sign in to comment.