Skip to content

Commit

Permalink
chore: lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Jan 10, 2024
1 parent 73296ce commit fe246d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -111,14 +111,18 @@ 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
}

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
Expand Down

0 comments on commit fe246d3

Please sign in to comment.