Skip to content

Commit f02849a

Browse files
committed
Fix linter issues
1 parent ff4f41c commit f02849a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

usage/renderer.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"unicode"
1212

1313
"github.com/mgutz/ansi"
14+
1415
md "go.step.sm/cli-utils/pkg/blackfriday"
1516
)
1617

@@ -191,36 +192,36 @@ func (r *Renderer) RenderNode(w io.Writer, node *md.Node, entering bool) md.Walk
191192
r.write(node.Literal)
192193
} else {
193194
s := strings.ReplaceAll(string(node.Literal), "\n", "\n"+strings.Repeat(" ", r.depth))
194-
r.printf(s)
195+
r.printf(s) //nolint:govet // allow non-constant
195196
}
196197
case md.Heading:
197198
if entering {
198-
r.printf(ansi.ColorCode("default+bh"))
199+
r.printf(ansi.ColorCode("default+bh")) //nolint:govet // allow non-constant
199200
} else {
200201
r.printf(ansi.Reset)
201202
r.printf("\n")
202203
}
203204
case md.Link:
204205
if entering {
205-
r.printf(ansi.ColorCode("default+b"))
206+
r.printf(ansi.ColorCode("default+b")) //nolint:govet // allow non-constant
206207
//r.printf("\033[2m") // Dim
207208
} else {
208209
r.printf(ansi.Reset)
209210
}
210211
case md.Strong:
211212
if entering {
212-
r.printf(ansi.ColorCode("default+bh"))
213+
r.printf(ansi.ColorCode("default+bh")) //nolint:govet // allow non-constant
213214
} else {
214215
r.printf(ansi.Reset)
215216
}
216217
case md.Emph:
217218
if entering {
218-
r.printf(ansi.ColorCode("default+u"))
219+
r.printf(ansi.ColorCode("default+u")) //nolint:govet // allow non-constant
219220
} else {
220221
r.printf(ansi.Reset)
221222
}
222223
case md.Code:
223-
r.printf(ansi.ColorCode("default+u"))
224+
r.printf(ansi.ColorCode("default+u")) //nolint:govet // allow non-constant
224225
r.write(node.Literal)
225226
r.printf(ansi.Reset)
226227
case md.List:
@@ -331,7 +332,7 @@ func (r *Renderer) RenderNode(w io.Writer, node *md.Node, entering bool) md.Walk
331332
for i := 0; i < len(parts); i++ {
332333
parts[i] = "\xff" + ansi.ColorCode("default+bh") + "\xff" + parts[i] + "\xff" + ansi.Reset + "\xff"
333334
}
334-
r.printf(strings.Join(parts, "\t") + "\t\n")
335+
r.printf(strings.Join(parts, "\t") + "\t\n") //nolint:govet // allow non-constant
335336
}
336337
}
337338
case md.TableRow:

0 commit comments

Comments
 (0)