Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/survivorbat/go-tsyncmap
Generic implementation of sync.Map
https://github.com/survivorbat/go-tsyncmap
generic go golang gopkg library map package sync syncmap type types
Last synced: about 2 months ago
JSON representation
Generic implementation of sync.Map
- Host: GitHub
- URL: https://github.com/survivorbat/go-tsyncmap
- Owner: survivorbat
- License: mit
- Created: 2023-01-15T09:59:01.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T15:44:11.000Z (over 1 year ago)
- Last Synced: 2024-06-21T09:38:09.554Z (6 months ago)
- Topics: generic, go, golang, gopkg, library, map, package, sync, syncmap, type, types
- Language: Go
- Homepage: https://pkg.go.dev/github.com/survivorbat/go-tsyncmap
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# πΊοΈοΈ Generic sync.Map
[![Go package](https://github.com/survivorbat/go-tsyncmap/actions/workflows/test.yaml/badge.svg)](https://github.com/survivorbat/go-tsyncmap/actions/workflows/test.yaml)
![GitHub](https://img.shields.io/github/license/survivorbat/go-tsyncmap)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/survivorbat/go-tsyncmap)A wrap around sync.Map that uses generics.
```go
package mainimport "github.com/survivorbat/go-tsyncmap"
func main() {
myMap := tsyncmap.Map[string, string]{}
myMap.Store("a", "b")
myMap.Load("a") // Returns "b"
}
```## β¬οΈ Installation
`go get github.com/survivorbat/go-tsyncmap`
## π Usage
```go
package mainimport "github.com/survivorbat/go-tsyncmap"
func main() {
myMap := tsyncmap.Map[string, string]{}myMap.Store("a", "b")
myMap.Load("a") // Returns "b"
}
```## π Plans
Not much.