Skip to content

Commit f8ae991

Browse files
committed
Simplified the mutex
1 parent 16ed656 commit f8ae991

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

client.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type Client struct {
5858
HTTPClient *http.Client // The HTTP client to send requests on.
5959
DebugLog *log.Logger // Optional logger for debugging purposes.
6060
features map[Feature]bool // Enabled features.
61-
featuresMutex *sync.RWMutex //Mutex for accessing feature map.
61+
featuresMutex sync.RWMutex //Mutex for accessing feature map.
6262
}
6363

6464
type contentType string
@@ -81,8 +81,7 @@ func New(accessKey string) *Client {
8181
HTTPClient: &http.Client{
8282
Timeout: httpClientTimeout,
8383
},
84-
features: make(map[Feature]bool),
85-
featuresMutex: &sync.RWMutex{},
84+
features: make(map[Feature]bool),
8685
}
8786
}
8887

0 commit comments

Comments
 (0)