diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/.travis.yml b/.travis.yml index 34e131c..c96b4d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ notifications: email: false before_script: - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest + - go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest # script always runs to completion (set +e). If we have linter issues AND a # failing test, we want to see both. Configure golangci-lint with a diff --git a/README.md b/README.md index b3b8fb0..eebd54c 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,13 @@ The package is now imported under the "cmap" namespace. ```go // Create a new map. - m := cmap.New() + m := cmap.New[string]() // Sets item within map, sets "bar" under key "foo" m.Set("foo", "bar") // Retrieve item from map. - if tmp, ok := m.Get("foo"); ok { - bar := tmp.(string) - } + bar, ok := m.Get("foo") // Removes item under key "foo" m.Remove("foo") diff --git a/go.mod b/go.mod index 7f4e628..ddbef90 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/orcaman/concurrent-map +module github.com/orcaman/concurrent-map/v2 go 1.18