https://github.com/matthewmueller/store
Simple configuration storage for your CLIs. Places configuration in the right place depending on your OS.
https://github.com/matthewmueller/store
cli config golang simple
Last synced: 11 months ago
JSON representation
Simple configuration storage for your CLIs. Places configuration in the right place depending on your OS.
- Host: GitHub
- URL: https://github.com/matthewmueller/store
- Owner: matthewmueller
- Created: 2017-02-02T07:09:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-30T15:04:29.000Z (over 8 years ago)
- Last Synced: 2025-03-20T05:46:00.366Z (over 1 year ago)
- Topics: cli, config, golang, simple
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Store
Simple configuration storage for your CLIs. Places configuration in the right place depending on your OS.
## Example
```go
db, err := store.New("app")
defer db.Close()
err = db.Put("user", "matt")
var v string
err = db.Get("user", &v)
fmt.Println("got", v)
```
## Installation
```
go get -u github.com/matthewmueller/store
```
## Thanks
- [env-paths](https://github.com/sindresorhus/env-paths): all the research into where to place configuration files depending on your OS was done here.
- [skv](https://github.com/rapidloop/skv): this package simplified the storage piece a lot.
## License
MIT