6
0
mirror of https://github.com/grdl/git-get.git synced 2026-02-04 14:31:49 +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,11 +1,14 @@
package pkg
import (
"errors"
"fmt"
"git-get/pkg/git"
"path/filepath"
)
var ErrMissingRepoArg = errors.New("missing <REPO> argument or --dump flag")
// GetCfg provides configuration for the Get command.
type GetCfg struct {
Branch string
@@ -20,7 +23,7 @@ type GetCfg struct {
// Get executes the "git get" command.
func Get(conf *GetCfg) error {
if conf.URL == "" && conf.Dump == "" {
return fmt.Errorf("missing <REPO> argument or --dump flag")
return ErrMissingRepoArg
}
if conf.URL != "" {