From b59721dd5d5d358a269f14ebd74588f0aad34021 Mon Sep 17 00:00:00 2001 From: Ramon de Klein Date: Mon, 25 Nov 2024 12:28:50 +0100 Subject: [PATCH] fix lint issues --- cmd/kes/key.go | 4 ++-- cmd/kes/policy.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/kes/key.go b/cmd/kes/key.go index b79915f2..d0a21367 100644 --- a/cmd/kes/key.go +++ b/cmd/kes/key.go @@ -251,12 +251,12 @@ func describeKeyCmd(args []string) { } year, month, day := info.CreatedAt.Date() - hour, min, sec := info.CreatedAt.Clock() + hour, minute, sec := info.CreatedAt.Clock() buf := &strings.Builder{} fmt.Fprintf(buf, "%-11s %s\n", "Name", info.Name) fmt.Fprintf(buf, "%-11s %s\n", "Algorithm", info.Algorithm) - fmt.Fprintf(buf, "%-11s %04d-%02d-%02d %02d:%02d:%02d\n", "Date", year, month, day, hour, min, sec) + fmt.Fprintf(buf, "%-11s %04d-%02d-%02d %02d:%02d:%02d\n", "Date", year, month, day, hour, minute, sec) fmt.Fprintf(buf, "%-11s %s", "Owner", info.CreatedBy) fmt.Print(buf) } diff --git a/cmd/kes/policy.go b/cmd/kes/policy.go index fbe63703..478c49b9 100644 --- a/cmd/kes/policy.go +++ b/cmd/kes/policy.go @@ -224,10 +224,10 @@ func infoPolicyCmd(args []string) { fmt.Println(faint.Render(fmt.Sprintf("%-11s", "Name")), policyStyle.Render(name)) if !info.CreatedAt.IsZero() { year, month, day := info.CreatedAt.Local().Date() - hour, min, sec := info.CreatedAt.Local().Clock() + hour, minute, sec := info.CreatedAt.Local().Clock() fmt.Println( faint.Render(fmt.Sprintf("%-11s", "Date")), - fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, min, sec), + fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d", year, month, day, hour, minute, sec), ) } if !info.CreatedBy.IsUnknown() { @@ -335,8 +335,8 @@ func showPolicyCmd(args []string) { header := tui.NewStyle().Bold(true).Foreground(Cyan) if !policy.CreatedAt.IsZero() { year, month, day := policy.CreatedAt.Local().Date() - hour, min, sec := policy.CreatedAt.Local().Clock() - fmt.Printf("\n%s %04d-%02d-%02d %02d:%02d:%02d\n", header.Render("Created at:"), year, month, day, hour, min, sec) + hour, minute, sec := policy.CreatedAt.Local().Clock() + fmt.Printf("\n%s %04d-%02d-%02d %02d:%02d:%02d\n", header.Render("Created at:"), year, month, day, hour, minute, sec) } if !policy.CreatedBy.IsUnknown() { fmt.Println(header.Render("Created by:"), policy.CreatedBy)