Fixing golang linters for VGC
Change-Id: I386d232c74ab47e24d92c18800dc144120b920da
diff --git a/internal/pkg/util/concurrentmap.go b/internal/pkg/util/concurrentmap.go
index f16bb29..380e3aa 100644
--- a/internal/pkg/util/concurrentmap.go
+++ b/internal/pkg/util/concurrentmap.go
@@ -11,7 +11,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-*/
+ */
package util
@@ -23,8 +23,8 @@
// ConcurrentMap implements a wrapper on top of SyncMap so that the count is also maintained
type ConcurrentMap struct {
- syncMap sync.Map
count *atomic.Uint64
+ syncMap sync.Map
MapLock sync.RWMutex
}
@@ -36,7 +36,7 @@
}
// Get - Gets return the value store in the sync map
-//If value is present, the result will be true else false
+// If value is present, the result will be true else false
func (cm *ConcurrentMap) Get(key interface{}) (value interface{}, result bool) {
return cm.syncMap.Load(key)
}
@@ -55,7 +55,6 @@
// Remove - Removes the key-value pair from the sync map
func (cm *ConcurrentMap) Remove(key interface{}) bool {
-
if _, ok := cm.syncMap.Load(key); ok {
cm.syncMap.Delete(key)
cm.count.Dec()