Skip to content

Commit

Permalink
Merge pull request #111 from andrewpmartinez/add.v2.for.generics
Browse files Browse the repository at this point in the history
adds v2 to module name, fixes readme
  • Loading branch information
orcaman committed May 26, 2022
2 parents b1f44ce + d6f6556 commit 807b48d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.idea/
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions README.md
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,3 +1,3 @@
module github.com/orcaman/concurrent-map
module github.com/orcaman/concurrent-map/v2

go 1.18

0 comments on commit 807b48d

Please sign in to comment.