https://github.com/bavix/features
https://github.com/bavix/features
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/bavix/features
- Owner: bavix
- License: mit
- Created: 2024-04-07T12:10:15.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T15:45:37.000Z (over 2 years ago)
- Last Synced: 2024-05-21T07:25:57.420Z (about 2 years ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# features
Simple implementation of the flags feature.
### Usage
```golang
import "github.com/bavix/features"
const (
Dishing features.Flag = iota
Washing
Cooking
Driving
)
//...
toggles := features.New(Dishing, Washing, Cooking)
toggles.Has(Cooking) // true
toggles.Has(Driving) // false
```