From eb7e59291db704bb46566fc84f2d89a84f8698ca Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 20 Jun 2025 09:09:20 -0700 Subject: [PATCH] fix: adjust line lengths to 77 characters for better readability Further reduce line lengths from 120 chars to 77 chars by breaking long strings and function signatures into multiple lines. --- internal/cli/generate.go | 11 ++++++++--- internal/cli/version_test.go | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/internal/cli/generate.go b/internal/cli/generate.go index 0823974..84b20d8 100644 --- a/internal/cli/generate.go +++ b/internal/cli/generate.go @@ -28,8 +28,9 @@ func newGenerateMnemonicCmd() *cobra.Command { return &cobra.Command{ Use: "mnemonic", Short: "Generate a random BIP39 mnemonic phrase", - Long: `Generate a cryptographically secure random BIP39 mnemonic phrase that can be used with ` + - `'secret init' or 'secret import'.`, + Long: `Generate a cryptographically secure random BIP39 ` + + `mnemonic phrase that can be used with 'secret init' ` + + `or 'secret import'.`, RunE: func(cmd *cobra.Command, args []string) error { cli := NewCLIInstance() return cli.GenerateMnemonic(cmd) @@ -94,7 +95,11 @@ func (cli *Instance) GenerateMnemonic(cmd *cobra.Command) error { // GenerateSecret generates a random secret and stores it in the vault func (cli *Instance) GenerateSecret( - cmd *cobra.Command, secretName string, length int, secretType string, force bool, + cmd *cobra.Command, + secretName string, + length int, + secretType string, + force bool, ) error { if length < 1 { return fmt.Errorf("length must be at least 1") diff --git a/internal/cli/version_test.go b/internal/cli/version_test.go index 6595991..e9cd36e 100644 --- a/internal/cli/version_test.go +++ b/internal/cli/version_test.go @@ -34,7 +34,8 @@ import ( // Helper function to set up a vault with long-term key func setupTestVault(t *testing.T, fs afero.Fs, stateDir string) { // Set mnemonic for testing - testMnemonic := "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" + testMnemonic := "abandon abandon abandon abandon abandon abandon " + + "abandon abandon abandon abandon abandon about" t.Setenv(secret.EnvMnemonic, testMnemonic) // Create vault