Skip to content

Commit ed3cbd8

Browse files
committed
fix(store): use proper indent style
1 parent b4a85b8 commit ed3cbd8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
root = true
22

33
[*]
4-
indent_style = tabs
4+
indent_style = tab
55
indent_size = 2
66
end_of_line = lf
77
charset = utf-8

store.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package gock
22

33
import (
4-
"sync"
4+
"sync"
55
)
66

77
// storeMutex is used interally for store synchronization.
@@ -30,15 +30,15 @@ func Register(mock Mock) {
3030

3131
// GetAll returns the current stack of registed mocks.
3232
func GetAll() []Mock {
33-
storeMutex.RLock()
34-
defer storeMutex.RUnlock()
33+
storeMutex.RLock()
34+
defer storeMutex.RUnlock()
3535
return mocks
3636
}
3737

3838
// Exists checks if the given Mock is already registered.
3939
func Exists(m Mock) bool {
40-
storeMutex.RLock()
41-
defer storeMutex.RUnlock()
40+
storeMutex.RLock()
41+
defer storeMutex.RUnlock()
4242
for _, mock := range mocks {
4343
if mock == m {
4444
return true
@@ -51,7 +51,7 @@ func Exists(m Mock) bool {
5151
func Remove(m Mock) {
5252
for i, mock := range mocks {
5353
if mock == m {
54-
storeMutex.Lock()
54+
storeMutex.Lock()
5555
mocks = append(mocks[:i], mocks[i+1:]...)
5656
storeMutex.Unlock()
5757
}
@@ -68,8 +68,8 @@ func Flush() {
6868
// Pending returns an slice of pending mocks.
6969
func Pending() []Mock {
7070
Clean()
71-
storeMutex.RLock()
72-
defer storeMutex.RUnlock()
71+
storeMutex.RLock()
72+
defer storeMutex.RUnlock()
7373
return mocks
7474
}
7575

0 commit comments

Comments
 (0)