Refactor unreachable code (#490)

This commit is contained in:
Stavros Panakakis
2021-09-07 14:02:29 +03:00
committed by GitHub
parent 23d485a9e4
commit 94ec06a3fe

View File

@@ -376,12 +376,13 @@ func (store *storage) PlaygroundPut(playground *types.Playground) error {
func (store *storage) PlaygroundGet(id string) (*types.Playground, error) {
store.rw.Lock()
defer store.rw.Unlock()
if playground, found := store.db.Playgrounds[id]; !found {
playground, found := store.db.Playgrounds[id]
if !found {
return nil, NotFoundError
} else {
return playground, nil
}
return nil, NotFoundError
return playground, nil
}
func (store *storage) load() error {