Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
weberc2 committed Apr 21, 2024
1 parent 688fd5b commit 336d8b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/randmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func randInt(min, max int) int {

func randData(min, max int) []byte {
buf := make([]byte, randInt(min, max))
crand.Read(buf)
_, _ = crand.Read(buf)
out := make([]byte, base64.RawURLEncoding.EncodedLen(len(buf)))
base64.RawURLEncoding.Encode(out, buf)
return out
Expand Down
3 changes: 2 additions & 1 deletion pkg/markdown/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func Convert(c *Config, url *url.URL, doc template.HTML) template.HTML {
// still l to the correct page.
if l, ok := node.(*ast.Link); ok && entering {
if l.NoteID > 0 {
w.Write(fmt.Appendf(
// ignoring error because we're writing to memory
_, _ = w.Write(fmt.Appendf(
nil,
`<sup class="footnote-ref" id="fnref:%[2]d">`+
`<a href="%[1]s#fn:%[2]d">%[2]d</a>`+
Expand Down

0 comments on commit 336d8b0

Please sign in to comment.