diff --git a/markdown.go b/markdown.go index 7d79ac9..12ca85d 100644 --- a/markdown.go +++ b/markdown.go @@ -149,7 +149,7 @@ func (m *Markdown) PlainTextf(format string, args ...interface{}) *Markdown { func (m *Markdown) Build() error { if _, err := fmt.Fprint(m.dest, m.String()); err != nil { if m.err != nil { - return fmt.Errorf("failed to write markdown text: %w: %s", err, m.err) + return fmt.Errorf("failed to write markdown text: %w: %s", err, m.err) //nolint:wrapcheck } return fmt.Errorf("failed to write markdown text: %w", err) } @@ -337,7 +337,7 @@ func (m *Markdown) Table(t TableSet) *Markdown { if err := t.ValidateColumns(); err != nil { // NOTE: If go version is 1.20, use errors.Join if m.err != nil { - m.err = fmt.Errorf("failed to validate columns: %w: %s", err, m.err) + m.err = fmt.Errorf("failed to validate columns: %w: %s", err, m.err) //nolint:wrapcheck } else { m.err = fmt.Errorf("failed to validate columns: %w", err) } diff --git a/markdown_test.go b/markdown_test.go index 1e63f72..557a6f7 100644 --- a/markdown_test.go +++ b/markdown_test.go @@ -160,7 +160,6 @@ func TestMarkdownNumberList(t *testing.T) { } func TestMarkdownCheckBoxf(t *testing.T) { - t.Run("success CheckBoxf(); check [x]", func(t *testing.T) { t.Parallel() @@ -171,8 +170,8 @@ func TestMarkdownCheckBoxf(t *testing.T) { } m.CheckBox(set) want := []string{ - fmt.Sprintf("- [x] Hello"), - fmt.Sprintf("- [ ] World"), + "- [x] Hello", + "- [ ] World", } got := m.body @@ -191,9 +190,9 @@ func TestMarkdownBlockquote(t *testing.T) { m := NewMarkdown(os.Stdout) m.Blockquote(fmt.Sprintf("%s%s%s%s%s", "Hello", lineFeed(), "Good", lineFeed(), "World")) want := []string{ - fmt.Sprintf("> Hello"), - fmt.Sprintf("> Good"), - fmt.Sprintf("> World"), + "> Hello", + "> Good", + "> World", } got := m.body