diff options
author | Steve Moyer <smoyer1@selesy.com> | 2022-11-28 15:15:41 -0500 |
---|---|---|
committer | Steve Moyer <smoyer1@selesy.com> | 2022-11-28 15:15:41 -0500 |
commit | 0cd2f3b4bda294b040e31337ddb380fb72192a63 (patch) | |
tree | d77017782735cb992f037a3c0e263b31068d8a41 /repository/config.go | |
parent | 49929c034f52272986ea6ac7457e64dbaa9454cb (diff) | |
download | git-bug-0cd2f3b4bda294b040e31337ddb380fb72192a63.tar.gz |
fix: remove repeated use of the same fmt.Errorf() calls
Diffstat (limited to 'repository/config.go')
-rw-r--r-- | repository/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/repository/config.go b/repository/config.go index 781a0c1d..7e1ee6e8 100644 --- a/repository/config.go +++ b/repository/config.go @@ -2,6 +2,7 @@ package repository import ( "errors" + "fmt" "strconv" "time" ) @@ -11,6 +12,14 @@ var ( ErrMultipleConfigEntry = errors.New("multiple config entry for the given key") ) +func newErrNoConfigEntry(key string) error { + return fmt.Errorf("%w: missing key %s", ErrNoConfigEntry, key) +} + +func newErrMultipleConfigEntry(key string) error { + return fmt.Errorf("%w: duplicated key %s", ErrMultipleConfigEntry, key) +} + // Config represent the common function interacting with the repository config storage type Config interface { ConfigRead |