errcheck flagged six unchecked Close() calls. The production write
path in indexgen.ProcessDir now closes the index file explicitly
after Execute and surfaces the close error so a deferred flush
failure isn't lost; tests use _ = f.Close() since they don't care.
Also adds a 'make fixstyle' target that runs gofmt -w over the tree,
matching the convention used elsewhere.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the dpkg-buildpackage / debhelper rig with the same pattern
used in vpp-maglev and govpp-snmp-agentx: a Makefile that
cross-compiles CGO-free static binaries for amd64 and arm64, plus a
debian/build-deb.sh that stages the .deb directly with dpkg-deb. The
two arch packages drop into build/ and run on any glibc/musl Linux of
the matching arch.
VERSION is parsed once from debian/changelog and injected at link
time via -ldflags "-X 'main.Version=...' -X 'main.Commit=...' -X
'main.Date=...'", so 's3-genindex -version' is the source of truth
for which build is running. The Version constant in main.go becomes
a var to make this work; the old sync-version make target is gone.
Removes the now-unused debian/{control,rules,install,compat} files
and the matching debhelper artifact entries from .gitignore. build/
is added to .gitignore.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>