Files
x/cmd/sutil/main.go
T
sneak 4d45aa4ca3 Restore config loading, keep exported Version, keep cgo off
Bring back the in-progress viper and go-homedir configuration loading
from the original root command as a persistent pre-run on the root
command, with a --config flag and a config line in sutil info. Restore
the exported main.Version with a nolint directive instead of renaming
it. Export CGO_ENABLED=0 from the Makefile, drop -race from make test,
and remove the C toolchain from the Docker builder stage.
2026-10-31 10:11:47 -07:00

23 lines
546 B
Go

// Command sutil is sneak's shell utility: small tools backed by the
// packages in sneak.berlin/go/x. Run `sutil --help` for the command list.
package main
import (
"os"
"sneak.berlin/go/x/internal/cli"
)
// Version is the build version. The Makefile and Dockerfile set it at link
// time with -ldflags "-X main.Version=...".
//
//nolint:gochecknoglobals // set by the linker; there is no other way
var Version = "dev"
func main() {
err := cli.New(cli.Params{Version: Version, ConfigDir: ""}).Execute()
if err != nil {
os.Exit(1)
}
}