$ go get -u github.com/utahta/go-atomicbool
package main
import (
"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")
}
}
- Fork it ( https://github.com/utahta/go-atomicbool/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request