Skip to content

Commit

Permalink
lint: 💄
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Dec 5, 2024
1 parent 2e0f644 commit c444a19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 7 additions & 0 deletions helper_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package csv

func must(err error) {
if err != nil {
panic(err)
}
}
6 changes: 0 additions & 6 deletions writer_samber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ import (
"github.com/stretchr/testify/assert"
)

func must(err error) {
if err != nil {
panic(err)
}
}

func buildTest(forceDoubleQuotes bool, escapeCharEqual bool, escapeCharPlus bool, escapeCharMinus bool, escapeCharAt bool, escapeCharTab bool, escapeCharCR bool) string {
var buff strings.Builder

Expand Down
4 changes: 2 additions & 2 deletions writer_stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (e errorWriter) Write(b []byte) (int, error) {
func TestError(t *testing.T) {
b := &bytes.Buffer{}
f := NewSafeWriter(b, SafetyOpts{})
f.Write([]string{"abc"})
must(f.Write([]string{"abc"}))
f.Flush()
err := f.Error()

Expand All @@ -82,7 +82,7 @@ func TestError(t *testing.T) {
}

f = NewSafeWriter(errorWriter{}, SafetyOpts{})
f.Write([]string{"abc"})
must(f.Write([]string{"abc"}))
f.Flush()
err = f.Error()

Expand Down

0 comments on commit c444a19

Please sign in to comment.