Merge pull request #25732 from 249043822/249043822-patch-1

Update fake.go Unlock optimize
This commit is contained in:
Filip Grzadkowski 2016-05-20 10:29:26 +02:00
commit 782de9d024

View File

@ -179,7 +179,7 @@ func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper {
// ClearActions clears the history of actions called on the fake client
func (c *Fake) ClearActions() {
c.Lock()
c.Unlock()
defer c.Unlock()
c.actions = make([]Action, 0)
}