Simplify error handling syntax

This commit is contained in:
2026-01-08 18:50:10 -05:00
parent d54b59030e
commit d21de424cb
18 changed files with 63 additions and 114 deletions
+1 -2
View File
@@ -101,8 +101,7 @@ func LibmuttonInit(inputCB func(prompt string) string, rcwPassword []byte, appen
// RCWSanityCheckGen generates the RCW sanity check file for libmutton.
func RCWSanityCheckGen(password []byte) error {
err := wrappers.GenSanityCheck(global.CfgDir+global.PathSeparator+"sanity.rcw", password)
if err != nil {
if err := wrappers.GenSanityCheck(global.CfgDir+global.PathSeparator+"sanity.rcw", password); err != nil {
return errors.New("unable to generate sanity check file: " + err.Error())
}
return nil