Updated tools version to 2.0.0
Also merged lint-style (gofmt) into golangci-lint (enabled gofmt).
Also removed redundant lint-sanity (govet) which is already checked by golangci-lint.
Also made minor code changes to pass new golangci-lint tests.
Also changed lint-mod slightly so it reverts any changes it makes go.mod, go.sum, and vendor/.
VOL-2647
Change-Id: I15557edf0f9225ea1c44e5bab29481d17a82e2b8
diff --git a/rw_core/core/device_ownership.go b/rw_core/core/device_ownership.go
index b616a90..171b91f 100644
--- a/rw_core/core/device_ownership.go
+++ b/rw_core/core/device_ownership.go
@@ -290,9 +290,7 @@
func (da *DeviceOwnership) deleteDeviceKey(id string) {
da.deviceToKeyMapLock.Lock()
defer da.deviceToKeyMapLock.Unlock()
- if _, exist := da.deviceToKeyMap[id]; exist {
- delete(da.deviceToKeyMap, id)
- }
+ delete(da.deviceToKeyMap, id)
}
// getOwnershipKey returns the ownership key that the id param uses. Ownership key is the parent