diff options
Diffstat (limited to 'vendor/go.uber.org/atomic/README.md')
-rw-r--r-- | vendor/go.uber.org/atomic/README.md | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/vendor/go.uber.org/atomic/README.md b/vendor/go.uber.org/atomic/README.md index 6505abf..ade0c20 100644 --- a/vendor/go.uber.org/atomic/README.md +++ b/vendor/go.uber.org/atomic/README.md | |||
@@ -3,9 +3,34 @@ | |||
3 | Simple wrappers for primitive types to enforce atomic access. | 3 | Simple wrappers for primitive types to enforce atomic access. |
4 | 4 | ||
5 | ## Installation | 5 | ## Installation |
6 | `go get -u go.uber.org/atomic` | 6 | |
7 | ```shell | ||
8 | $ go get -u go.uber.org/atomic@v1 | ||
9 | ``` | ||
10 | |||
11 | ### Legacy Import Path | ||
12 | |||
13 | As of v1.5.0, the import path `go.uber.org/atomic` is the only supported way | ||
14 | of using this package. If you are using Go modules, this package will fail to | ||
15 | compile with the legacy import path path `github.com/uber-go/atomic`. | ||
16 | |||
17 | We recommend migrating your code to the new import path but if you're unable | ||
18 | to do so, or if your dependencies are still using the old import path, you | ||
19 | will have to add a `replace` directive to your `go.mod` file downgrading the | ||
20 | legacy import path to an older version. | ||
21 | |||
22 | ``` | ||
23 | replace github.com/uber-go/atomic => github.com/uber-go/atomic v1.4.0 | ||
24 | ``` | ||
25 | |||
26 | You can do so automatically by running the following command. | ||
27 | |||
28 | ```shell | ||
29 | $ go mod edit -replace github.com/uber-go/atomic=github.com/uber-go/atomic@v1.4.0 | ||
30 | ``` | ||
7 | 31 | ||
8 | ## Usage | 32 | ## Usage |
33 | |||
9 | The standard library's `sync/atomic` is powerful, but it's easy to forget which | 34 | The standard library's `sync/atomic` is powerful, but it's easy to forget which |
10 | variables must be accessed atomically. `go.uber.org/atomic` preserves all the | 35 | variables must be accessed atomically. `go.uber.org/atomic` preserves all the |
11 | functionality of the standard library, but wraps the primitive types to | 36 | functionality of the standard library, but wraps the primitive types to |
@@ -21,15 +46,17 @@ atom.CAS(40, 11) | |||
21 | See the [documentation][doc] for a complete API specification. | 46 | See the [documentation][doc] for a complete API specification. |
22 | 47 | ||
23 | ## Development Status | 48 | ## Development Status |
49 | |||
24 | Stable. | 50 | Stable. |
25 | 51 | ||
26 | <hr> | 52 | --- |
53 | |||
27 | Released under the [MIT License](LICENSE.txt). | 54 | Released under the [MIT License](LICENSE.txt). |
28 | 55 | ||
29 | [doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg | 56 | [doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg |
30 | [doc]: https://godoc.org/go.uber.org/atomic | 57 | [doc]: https://godoc.org/go.uber.org/atomic |
31 | [ci-img]: https://travis-ci.org/uber-go/atomic.svg?branch=master | 58 | [ci-img]: https://travis-ci.com/uber-go/atomic.svg?branch=master |
32 | [ci]: https://travis-ci.org/uber-go/atomic | 59 | [ci]: https://travis-ci.com/uber-go/atomic |
33 | [cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg | 60 | [cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg |
34 | [cov]: https://codecov.io/gh/uber-go/atomic | 61 | [cov]: https://codecov.io/gh/uber-go/atomic |
35 | [reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic | 62 | [reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic |