Skip to content

Commit

Permalink
Merge pull request #515 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 13.9.1
  • Loading branch information
andyone authored Oct 22, 2024
2 parents 44b967c + a9aa5cb commit 11c53ca
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### [13.9.1](https://kaos.sh/ek/13.9.1)

- `[errors]` Fixed bug with extra newline character at the end of `Error` output

### [13.9.0](https://kaos.sh/ek/13.9.0)

- `[errors]` Added new package of utilities for working with errors
Expand Down
7 changes: 5 additions & 2 deletions errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ func (e Errors) Num() int {
func (e Errors) Error(prefix string) string {
var buf strings.Builder

for _, err := range e {
for i, err := range e {
buf.WriteString(prefix)
buf.WriteString(err.Error())
buf.WriteRune('\n')

if i+1 < len(e) {
buf.WriteRune('\n')
}
}

return buf.String()
Expand Down
2 changes: 1 addition & 1 deletion errors/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *ErrorsSuite) TestPositive(c *C) {
},
)
c.Assert(errs.Add(nil), NotNil)
c.Assert(errs.Error(" "), Equals, " 1\n 2\n 3\n 4\n 5\n")
c.Assert(errs.Error(" "), Equals, " 1\n 2\n 3\n 4\n 5")

errs.Reset()

Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ package ek
// ////////////////////////////////////////////////////////////////////////////////// //

// VERSION is current ek package version
const VERSION = "13.9.0"
const VERSION = "13.9.1"

0 comments on commit 11c53ca

Please sign in to comment.