mirror of
https://github.com/Pungyeon/clean-go-article.git
synced 2024-11-23 14:14:05 +00:00
Merge pull request #35 from Pungyeon/fix/issue_28
finally fixing this issue
This commit is contained in:
commit
0595e82363
|
@ -780,7 +780,9 @@ func (store *Store) GetItem(id string) (Item, error) {
|
||||||
|
|
||||||
item, ok := store.items[id]
|
item, ok := store.items[id]
|
||||||
if !ok {
|
if !ok {
|
||||||
return NullItem, fmt.Errorf("Could not find item with ID: %s", id)
|
return NullItem, NewErrorDetails(
|
||||||
|
ErrItemNotFound,
|
||||||
|
fmt.Sprintf("could not find item with id: %s", id))
|
||||||
}
|
}
|
||||||
return item, nil
|
return item, nil
|
||||||
}
|
}
|
||||||
|
@ -847,7 +849,7 @@ type App struct {
|
||||||
|
|
||||||
func (app *App) Cache() *KVCache {
|
func (app *App) Cache() *KVCache {
|
||||||
if app.cache == nil {
|
if app.cache == nil {
|
||||||
app.cache = NewKVCache()
|
app.cache = NewKVCache()
|
||||||
}
|
}
|
||||||
return app.cache
|
return app.cache
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue