Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/utahta/go-atomicbool
Atomic boolean for Go
https://github.com/utahta/go-atomicbool
atomicbool go
Last synced: 3 days ago
JSON representation
Atomic boolean for Go
- Host: GitHub
- URL: https://github.com/utahta/go-atomicbool
- Owner: utahta
- License: mit
- Created: 2016-10-29T02:54:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-29T02:57:45.000Z (about 8 years ago)
- Last Synced: 2024-11-14T23:11:36.762Z (2 months ago)
- Topics: atomicbool, go
- Language: Go
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Atomic Bool
[![Build Status](https://travis-ci.org/utahta/go-atomicbool.svg?branch=master)](https://travis-ci.org/utahta/go-atomicbool)
## Installing
```
$ go get -u github.com/utahta/go-atomicbool
```## Usage
```go
package mainimport (
"fmt""github.com/utahta/go-atomicbool"
)func main() {
b := atomicbool.New(false)if b.Disabled() {
fmt.Println("disabled")
}b.Set(true)
if b.Enabled() {
fmt.Println("enabled")
}
}
```## Contributing
1. Fork it ( https://github.com/utahta/go-atomicbool/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request