From 96db102a8f286075ad8277b8bd8dc6a442e4c0ac Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 23 May 2024 16:26:14 -0300 Subject: [PATCH] fix: lint issues Signed-off-by: Carlos Alexandro Becker --- cmd/melt/main.go | 4 ++-- cmd/melt/main_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/melt/main.go b/cmd/melt/main.go index fb1f46e..18d12c0 100644 --- a/cmd/melt/main.go +++ b/cmd/melt/main.go @@ -38,7 +38,7 @@ var ( Foreground(lipgloss.AdaptiveColor{Light: "#FF5E8E", Dark: "#FF5E8E"}). Background(lipgloss.AdaptiveColor{Light: completeColor("#ECECEC", "255", "7"), Dark: "#1F1F1F"}). Padding(0, 1) - mnemonicStyle = baseStyle.Copy(). + mnemonicStyle = baseStyle. Foreground(violet). Background(lipgloss.AdaptiveColor{Light: completeColor("#EEEBFF", "255", "7"), Dark: completeColor("#1B1731", "235", "8")}). Padding(1, 2) //nolint: gomnd @@ -317,7 +317,7 @@ func getWidth(max int) int { } func renderBlock(w io.Writer, s lipgloss.Style, width int, str string) { - _, _ = io.WriteString(w, s.Copy().Width(width).Render(str)) + _, _ = io.WriteString(w, s.Width(width).Render(str)) _, _ = io.WriteString(w, "\n") } diff --git a/cmd/melt/main_test.go b/cmd/melt/main_test.go index cd750ac..ba8c9f8 100644 --- a/cmd/melt/main_test.go +++ b/cmd/melt/main_test.go @@ -87,7 +87,7 @@ func TestBackupRestoreKnownKey(t *testing.T) { var b bytes.Buffer is.NoErr(restore(expectedMnemonic, staticPass(nil), restoreToWriter(&b))) - k, err := ssh.ParsePrivateKey([]byte(b.String())) + k, err := ssh.ParsePrivateKey(b.Bytes()) is.NoErr(err) is.Equal(expectedFingerprint, ssh.FingerprintSHA256(k.PublicKey()))