From 9e210f61a6259c37cc7938cf353527cf072b3eda Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sun, 23 Jun 2024 17:47:50 +0200 Subject: ref: User correct err naming --- pkg/config/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/config/config.go') 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, ) } -- cgit v1.2.3