6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-05 19:27:57 +00:00

Fix issues found by err113 linter

This commit is contained in:
Grzegorz Dlugoszewski
2025-08-24 16:53:48 +02:00
parent 1e1584ba33
commit f20ab7dea2
4 changed files with 18 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
package pkg
import (
"errors"
"fmt"
"git-get/pkg/cfg"
"git-get/pkg/git"
@@ -8,6 +9,8 @@ import (
"strings"
)
var ErrInvalidOutput = errors.New("invalid output format")
// ListCfg provides configuration for the List command.
type ListCfg struct {
Fetch bool
@@ -37,7 +40,7 @@ func List(conf *ListCfg) error {
case cfg.OutDump:
fmt.Print(print.NewDumpPrinter().Print(printables))
default:
return fmt.Errorf("invalid --out flag; allowed values: [%s]", strings.Join(cfg.AllowedOut, ", "))
return fmt.Errorf("%w, allowed values: [%s]", ErrInvalidOutput, strings.Join(cfg.AllowedOut, ", "))
}
return nil