Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions response.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func (mc *MockCatcher) FindResponse(query string, args []driver.NamedValue) *Fak

if mc.PanicOnEmptyResponse {
panic(fmt.Sprintf("No responses matches query %s ", query))
} else {
fmt.Sprintf("No responses matches query %s ", query)
}

// Let's have always dummy version of response
Expand Down Expand Up @@ -129,8 +131,8 @@ func (fr *FakeResponse) isArgsMatch(args []driver.NamedValue) bool {
// isQueryMatch returns true if searched query is matched FakeResponse Pattern
func (fr *FakeResponse) isQueryMatch(query string) bool {
fr.mu.Lock()
defer fr.mu.Unlock()
defer fr.mu.Unlock()

if fr.Pattern == "" {
return true
}
Expand Down