Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 670 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 670 Bytes

atomic

Atomic operations as methods on types

Go Reference Build Status

example usage

package main

import (
	"fmt"

	"github.com/nightlyone/atomic"
)

type Service struct {
	Health atomic.Bool
}

func main() {
	service := new(Service)
	isHealthy := service.Health.Value()
	fmt.Printf("service is healthy? %t\n", isHealthy)
	// Output: service is healthy? false
}

LICENSE

BSD-3-Clause

Contributing

Pull requests and github issues welcome.