aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/config.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-23 17:47:50 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-23 17:51:05 +0200
commit9e210f61a6259c37cc7938cf353527cf072b3eda (patch)
tree5f2855377262b2e915ebf801502c835d6bcec75b /pkg/config/config.go
parentba84c0d82066739adbca468846a2688e02432b6f (diff)
downloadcerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.tar.gz
cerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.tar.bz2
cerrado-9e210f61a6259c37cc7938cf353527cf072b3eda.zip
ref: User correct err naming
Diffstat (limited to 'pkg/config/config.go')
-rw-r--r--pkg/config/config.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 3759b7c..fd19808 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -14,9 +14,9 @@ import (
)
var (
- ScanPathErr = errors.New("Scan path does not exist")
- RepoPathErr = errors.New("Repository path does not exist")
- InvalidPropertyErr = errors.New("Invalid property")
+ ErrScanPath = errors.New("Scan path does not exist")
+ ErrRepoPath = errors.New("Repository path does not exist")
+ ErrInvalidProperty = errors.New("Invalid property")
)
type (
@@ -113,7 +113,7 @@ func (c *ConfigurationRepository) List() []*GitRepositoryConfiguration {
// and applying them default configuration.
func (c *ConfigurationRepository) expandOnScanPath(scanPath string, public bool) error {
if !u.FileExist(scanPath) {
- return ScanPathErr
+ return ErrScanPath
}
entries, err := os.ReadDir(scanPath)
@@ -185,7 +185,7 @@ func setRepositories(block scfg.Block, repositories *[]*GitRepositoryConfigurati
if len(r.Params) != 1 {
return fmt.Errorf(
"Invlid number of params for repository: %w",
- InvalidPropertyErr,
+ ErrInvalidProperty,
)
}
@@ -198,7 +198,7 @@ func setRepositories(block scfg.Block, repositories *[]*GitRepositoryConfigurati
return fmt.Errorf(
"Invlid number of params for %s: %w",
d.Name,
- InvalidPropertyErr,
+ ErrInvalidProperty,
)
}