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.
26 lines
576 B
Go
26 lines
576 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
// TestAppname pins the program name that main passes to cli.Run; it is
|
|
// the name that appears in usage output and in the log prefix. It also
|
|
// keeps this package compiled under `go test`.
|
|
func TestAppname(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
assert.Equal(t, "mfer", Appname)
|
|
}
|
|
|
|
// TestVersionDefaults documents that Version and Gitrev are empty unless
|
|
// injected at build time via -ldflags.
|
|
func TestVersionDefaults(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
assert.Empty(t, Version)
|
|
assert.Empty(t, Gitrev)
|
|
}
|