From fe246d337bc1f35f7f27feec378ae93b34c0702f Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 10 Jan 2024 09:27:22 -0300 Subject: [PATCH] chore: lint issues Signed-off-by: Carlos Alexandro Becker --- flag.go | 1 + main.go | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/flag.go b/flag.go index 5de8516a..f35aae1b 100644 --- a/flag.go +++ b/flag.go @@ -69,6 +69,7 @@ type durationFlag time.Duration func (d *durationFlag) Set(s string) error { v, err := duration.Parse(s) *d = durationFlag(v) + //nolint: wrapcheck return err } diff --git a/main.go b/main.go index e291859f..77387f51 100644 --- a/main.go +++ b/main.go @@ -87,7 +87,7 @@ var ( if err := huh.Run( huh.NewText(). Title(fmt.Sprintf("Write a prompt for %s:", config.Model)). - Lines(4). + Lines(4). //nolint: gomnd Value(&config.Prefix), ); err != nil { return modsError{ @@ -111,6 +111,7 @@ var ( if config.Dirs { fmt.Printf("Configuration: %s\n", filepath.Dir(config.SettingsPath)) + //nolint: gomnd fmt.Printf("%*sCache: %s\n", 8, " ", filepath.Dir(config.CachePath)) return nil } @@ -118,7 +119,10 @@ var ( if config.Settings { c, err := editor.Cmd("mods", config.SettingsPath) if err != nil { - return err + return modsError{ + err: err, + reason: "Could not edit your settings file.", + } } c.Stdin = stdin c.Stdout = stdout