https://github.com/hashload/go-singleton
https://github.com/hashload/go-singleton
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hashload/go-singleton
- Owner: HashLoad
- License: mit
- Created: 2019-12-02T18:22:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T18:54:34.000Z (about 6 years ago)
- Last Synced: 2025-04-13T01:25:11.757Z (10 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-singleton
## Get started
```go
import "github.com/HashLoad/go-singleton"
...
// Set value, value is s generic interface{}
pattern.Singleton.Set("key", "value")
// Get value, value is a generic interface{}
value, err := pattern.Singleton.Get("key")
```