Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWilkes committed Sep 18, 2024
1 parent b62538d commit df2f477
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/git/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package git

import (
"bufio"
"fmt"
"errors"
"os/exec"
"strings"

Expand All @@ -23,7 +23,7 @@ func Clone(repoURL string, repoDirPath string) error {
scanner := bufio.NewScanner(stderr)
for scanner.Scan() {
if strings.Contains(strings.ToLower(scanner.Text()), "error") || strings.Contains(strings.ToLower(scanner.Text()), "fatal") {
return fmt.Errorf(scanner.Text())
return errors.New(scanner.Text())
}

clio.Info(scanner.Text())
Expand Down
4 changes: 2 additions & 2 deletions pkg/git/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package git

import (
"bufio"
"fmt"
"errors"
"os/exec"
"strings"

Expand All @@ -25,7 +25,7 @@ func Pull(repoDirPath string, shouldSilentLogs bool) error {
scanner := bufio.NewScanner(stderr)
for scanner.Scan() {
if strings.Contains(scanner.Text(), "error") || strings.Contains(scanner.Text(), "fatal") {
return fmt.Errorf(scanner.Text())
return errors.New(scanner.Text())
}

if shouldSilentLogs {
Expand Down
2 changes: 1 addition & 1 deletion pkg/granted/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func installFishCompletions(c *cli.Context) error {
// Try to create a file
err := os.WriteFile(executableDir, []byte(combinedOutput), 0600)
if err != nil {
return fmt.Errorf("Something went wrong when saving fish autocompletions: " + err.Error())
return fmt.Errorf("something went wrong when saving fish autocompletions: %s", err.Error())
}
clio.Success("Fish autocompletions generated successfully")
clio.Info("To use these completions please run the executable:")
Expand Down

0 comments on commit df2f477

Please sign in to comment.