# atomic (Go)

> Typed wrappers around Go sync/atomic that enforce atomic access

Source: https://talira.ai/catalog/atomic-go-axpm897x
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / concurrency](https://talira.ai/categories/libraries/concurrency), [languages / go](https://talira.ai/categories/languages/go)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [Uber](https://talira.ai/orgs/uber.md)

atomic is a Go library from Uber that wraps primitive types (integers, booleans, floats, strings, durations, times, errors, pointers) in types whose only methods are atomic, so a variable meant for atomic access can never be read or written plainly by mistake. It keeps everything the standard library sync/atomic offers, including CompareAndSwap, behind a more convenient API. Its import path is go.uber.org/atomic; the old github.com/uber-go/atomic path stopped compiling with Go modules at v1.5.0. Install it with go get go.uber.org/atomic@v1.

## Links

- GitHub: https://github.com/uber-go/atomic
- Docs: https://pkg.go.dev/go.uber.org/atomic

## Problems it solves

- stop teammates from reading a shared counter without sync/atomic in a Go service
- atomic booleans and durations in Go without remembering which variables need atomic calls
- share a flag between goroutines in Go with a type that only allows atomic loads and stores

## Features

- typed atomic integers, booleans, floats, strings, durations and times
- generic atomic Pointer[T]
- CompareAndSwap, Swap, Add and Sub methods
- JSON marshalling for atomic types

## Limitations

- The legacy import path github.com/uber-go/atomic doesn't compile with Go modules from v1.5.0; old dependencies need a replace directive.[^1]

## Trust

Overall: 0.45 out of 1.
Signals: maintenance 0.54, adoption 0.63, momentum 0.33, community 0.59, backing 0.30, extensibility 0.00.

- last commit 41 days ago
- 14 commits in the last 90 days
- latest release v1.12.0 2 months ago
- 1.5k GitHub stars
- 29 contributors
- backed by Uber

## Sources

[^1]: https://github.com/uber-go/atomic (checked 28 Nov 2026)
[^2]: https://github.com/uber-go/atomic/blob/master/LICENSE.txt (checked 28 Nov 2026)
