Abhinav Gupta d17779fa59 nocmp/test: Test with Go modules (#83)
The nocmp integration test creates a temporary directory with a copy of
nocmp.go and a Go file that should not compile if our implementation of
nocmp is correct.

This worked fine without a GOPATH set previously, but with Go 1.16, it
seems that we need to have the GOPATH environment variable set (ref
https://github.com/golang/go/commit/cdbd4d49d8b).

Change the nocmp integration test to rely on Go modules for the test.
We can point GOPATH to an arbitrary temporary directory because we don't
rely on anything in it.

Fixes #82
2021-02-02 10:07:29 -08:00
2019-10-29 14:13:54 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2019-10-29 15:04:38 -07:00
2020-09-11 11:24:56 -07:00
2020-09-14 09:04:36 -07:00
2020-05-15 15:47:25 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:19 -07:00
2020-09-11 11:24:19 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00
2020-09-11 11:24:56 -07:00

atomic GoDoc Build Status Coverage Status Go Report Card

Simple wrappers for primitive types to enforce atomic access.

Installation

$ go get -u go.uber.org/atomic@v1

Legacy Import Path

As of v1.5.0, the import path go.uber.org/atomic is the only supported way of using this package. If you are using Go modules, this package will fail to compile with the legacy import path path github.com/uber-go/atomic.

We recommend migrating your code to the new import path but if you're unable to do so, or if your dependencies are still using the old import path, you will have to add a replace directive to your go.mod file downgrading the legacy import path to an older version.

replace github.com/uber-go/atomic => github.com/uber-go/atomic v1.4.0

You can do so automatically by running the following command.

$ go mod edit -replace github.com/uber-go/atomic=github.com/uber-go/atomic@v1.4.0

Usage

The standard library's sync/atomic is powerful, but it's easy to forget which variables must be accessed atomically. go.uber.org/atomic preserves all the functionality of the standard library, but wraps the primitive types to provide a safer, more convenient API.

var atom atomic.Uint32
atom.Store(42)
atom.Sub(2)
atom.CAS(40, 11)

See the documentation for a complete API specification.

Development Status

Stable.


Released under the MIT License.

Description
atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][reportcard-img]][reportcard]
Readme 235 KiB
Languages
Go 97.9%
Makefile 2.1%