(id string)
| 73 | } |
| 74 | |
| 75 | func (r *appResolver) Delete(id string) error { |
| 76 | r.mutex.Lock() |
| 77 | app, ok := r.idToAppMap[id] |
| 78 | if !ok { |
| 79 | r.mutex.Unlock() |
| 80 | return nil |
| 81 | } |
| 82 | appId := app.GetId() |
| 83 | delete(r.idToAppMap, appId) |
| 84 | r.mutex.Unlock() |
| 85 | if err := app.delete(); err != nil { |
| 86 | return errors.WithMessagef(err, "delete app id=%s", appId) |
| 87 | } |
| 88 | return nil |
| 89 | } |
no test coverage detected