Update golangci-lint to v2.12.2 with canonical config (closes #60)
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
Adopts golangci-lint v2.12.2 and the canonical .golangci.yml (default: all), and fixes all resulting findings across the tree. Two intended behavior changes: absent MFFilePath.Mtime is handled explicitly in freshen, list and export rather than dereferenced (main panicked); gpg positional key IDs now follow an explicit -- end-of-options marker. All twelve reworded user-visible error messages restored to byte-identical parity with main and pinned by tests.
This commit was merged in pull request #59.
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
// Package bork defines the sentinel errors used by the manifest
|
||||
// reader and writer.
|
||||
package bork
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrMissingMagic = errors.New("missing magic bytes in file")
|
||||
// ErrMissingMagic indicates the input lacks the manifest magic bytes.
|
||||
ErrMissingMagic = errors.New("missing magic bytes in file")
|
||||
// ErrFileTruncated indicates the input ended before the expected length.
|
||||
ErrFileTruncated = errors.New("file/stream is truncated abnormally")
|
||||
)
|
||||
|
||||
func Newf(format string, args ...interface{}) error {
|
||||
return fmt.Errorf(format, args...)
|
||||
}
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package bork
|
||||
package bork_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"sneak.berlin/go/mfer/internal/bork"
|
||||
)
|
||||
|
||||
func TestBuild(t *testing.T) {
|
||||
assert.NotNil(t, ErrMissingMagic)
|
||||
t.Parallel()
|
||||
assert.Error(t, bork.ErrMissingMagic)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user