Refactor unreachable code (#490)
This commit is contained in:
committed by
GitHub
parent
23d485a9e4
commit
94ec06a3fe
@@ -376,12 +376,13 @@ func (store *storage) PlaygroundPut(playground *types.Playground) error {
|
|||||||
func (store *storage) PlaygroundGet(id string) (*types.Playground, error) {
|
func (store *storage) PlaygroundGet(id string) (*types.Playground, error) {
|
||||||
store.rw.Lock()
|
store.rw.Lock()
|
||||||
defer store.rw.Unlock()
|
defer store.rw.Unlock()
|
||||||
if playground, found := store.db.Playgrounds[id]; !found {
|
|
||||||
|
playground, found := store.db.Playgrounds[id]
|
||||||
|
if !found {
|
||||||
return nil, NotFoundError
|
return nil, NotFoundError
|
||||||
} else {
|
|
||||||
return playground, nil
|
|
||||||
}
|
}
|
||||||
return nil, NotFoundError
|
|
||||||
|
return playground, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (store *storage) load() error {
|
func (store *storage) load() error {
|
||||||
|
|||||||
Reference in New Issue
Block a user