fix: add blank lines before return statements (nlreturn)

Fix nlreturn linting issues by adding blank lines before return
statements in cli and secret packages.
This commit is contained in:
2025-06-20 09:37:56 -07:00
parent dcc15008cd
commit 2a1e0337fd
10 changed files with 40 additions and 0 deletions

View File

@@ -41,11 +41,13 @@ func newUnlockersListCmd() *cobra.Command {
cli := NewCLIInstance()
cli.cmd = cmd
return cli.UnlockersList(jsonOutput)
},
}
cmd.Flags().Bool("json", false, "Output in JSON format")
return cmd
}
@@ -62,6 +64,7 @@ func newUnlockersAddCmd() *cobra.Command {
}
cmd.Flags().String("keyid", "", "GPG key ID for PGP unlockers")
return cmd
}
@@ -169,6 +172,7 @@ func (cli *Instance) UnlockersList(jsonOutput bool) error {
case "pgp":
unlocker = secret.NewPGPUnlocker(cli.fs, unlockerDir, diskMetadata)
}
break
}
}
@@ -208,6 +212,7 @@ func (cli *Instance) UnlockersList(jsonOutput bool) error {
if len(unlockers) == 0 {
cli.cmd.Println("No unlockers found in current vault.")
cli.cmd.Println("Run 'secret unlockers add passphrase' to create one.")
return nil
}
@@ -263,6 +268,7 @@ func (cli *Instance) UnlockersAdd(unlockerType string, cmd *cobra.Command) error
}
cmd.Printf("Created passphrase unlocker: %s\n", passphraseUnlocker.GetID())
return nil
case "keychain":
@@ -275,6 +281,7 @@ func (cli *Instance) UnlockersAdd(unlockerType string, cmd *cobra.Command) error
if keyName, err := keychainUnlocker.GetKeychainItemName(); err == nil {
cmd.Printf("Keychain Item Name: %s\n", keyName)
}
return nil
case "pgp":
@@ -295,6 +302,7 @@ func (cli *Instance) UnlockersAdd(unlockerType string, cmd *cobra.Command) error
cmd.Printf("Created PGP unlocker: %s\n", pgpUnlocker.GetID())
cmd.Printf("GPG Key ID: %s\n", gpgKeyID)
return nil
default: