fix(lint): Upgrade to golangci-lint v2, Go 1.24, and fixing lint errors

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
This commit is contained in:
Dave Henderson
2025-04-17 08:55:54 -04:00
parent 8b7020bdf1
commit a28550c008
7 changed files with 49 additions and 40 deletions

View File

@ -184,8 +184,6 @@ func readCmd(cmd *cobra.Command, _ []string) error {
// humanizeBytes produces a human readable representation of an IEC size.
// Taken from github.com/dustin/go-humanize
//
//nolint:gomnd
func humanizeBytes(s float64) string {
base := 1024.0
sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"}

View File

@ -21,7 +21,7 @@ func commands() *cobra.Command {
This tool can be used to verify that the OneRNG device operates
correctly, and that the firmware has not been tampered with.`,
Version: version.Version,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
cmd.SilenceErrors = true
cmd.SilenceUsage = true