refactor: modernize Go primitives

- Replace interface{} with any (Go 1.18) across confluence/api.go,
  macro/macro.go, util/cli.go, util/error_handler.go, includes/templates.go
- Replace sort.SliceStable with slices.SortStableFunc + cmp.Compare (Go 1.21)
  in attachment/attachment.go, consistent with existing slices usage
- Replace fmt.Errorf("%s", msg) with errors.New(msg) in mark.go

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Manuel Rüger
2026-04-08 01:34:06 +02:00
parent 4a5f3798eb
commit a43f5fec2e
7 changed files with 51 additions and 49 deletions

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"crypto/sha1"
"encoding/hex"
"errors"
"fmt"
"io"
"os"
@@ -97,7 +98,7 @@ func Run(config Config) error {
if config.CI {
log.Warn().Msg(msg)
} else {
return fmt.Errorf("%s", msg)
return errors.New(msg)
}
}