Skip to content

Commit e652ab5

Browse files
authored
fix: router and storage uninitialized cache error messages (#368)
1 parent 1bf3055 commit e652ab5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/resolver/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (s *CachingRouter) Get(ctx context.Context, svc internal.AllServices) (Reso
3737
// GetCached is a helper method for commands to use when they need to get an item from the cached results
3838
func (s *CachingRouter) GetCached(uuid string) (upcloud.Router, error) {
3939
if s.cached == nil {
40-
return upcloud.Router{}, errors.New("caching network does not have a cache initialized")
40+
return upcloud.Router{}, errors.New("caching router does not have a cache initialized")
4141
}
4242
for _, router := range s.cached {
4343
if router.UUID == uuid {

internal/resolver/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (s *CachingStorage) Resolve(arg string) (resolved string, err error) {
5757
// GetCached is a helper method for commands to use when they need to get an item from the cached results
5858
func (s *CachingStorage) GetCached(uuid string) (upcloud.Storage, error) {
5959
if s.cachedStorages == nil {
60-
return upcloud.Storage{}, errors.New("caching storages does not have a cache initialized")
60+
return upcloud.Storage{}, errors.New("caching storage does not have a cache initialized")
6161
}
6262
for _, storage := range s.cachedStorages.Storages {
6363
if storage.UUID == uuid {

0 commit comments

Comments
 (0)