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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user