Use go.uber.org import path (#13)
This commit is contained in:
committed by
GitHub
parent
6c2817a9ef
commit
0ab99594f7
@@ -1,5 +1,6 @@
|
|||||||
sudo: false
|
sudo: false
|
||||||
language: go
|
language: go
|
||||||
|
go_import_path: go.uber.org/atomic
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.5
|
- 1.5
|
||||||
@@ -15,5 +16,6 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- make test_ci
|
- make test_ci
|
||||||
|
- scripts/test-ubergo.sh
|
||||||
- make lint
|
- make lint
|
||||||
- travis_retry goveralls -coverprofile=cover.out -service=travis-ci
|
- travis_retry goveralls -coverprofile=cover.out -service=travis-ci
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -1,14 +1,14 @@
|
|||||||
# atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]
|
# atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]
|
||||||
|
|
||||||
Simple numeric wrappers to enforce atomic access.
|
Simple wrappers for primitive types to enforce atomic access.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
`go get -u github.com/uber-go/atomic`
|
`go get -u go.uber.org/atomic`
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
The standard library's `sync/atomic` is powerful, but it's easy to forget which
|
The standard library's `sync/atomic` is powerful, but it's easy to forget which
|
||||||
variables must be accessed atomically. `uber-go/atomic` preserves all the
|
variables must be accessed atomically. `go.uber.org/atomic` preserves all the
|
||||||
functionality of the standard library, but wraps the primitive numeric types to
|
functionality of the standard library, but wraps the primitive types to
|
||||||
provide a safer, more convenient API.
|
provide a safer, more convenient API.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
@@ -27,7 +27,7 @@ Stable.
|
|||||||
Released under the [MIT License](LICENSE.txt).
|
Released under the [MIT License](LICENSE.txt).
|
||||||
|
|
||||||
[doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg
|
[doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg
|
||||||
[doc]: https://godoc.org/github.com/uber-go/atomic
|
[doc]: https://godoc.org/go.uber.org/atomic
|
||||||
[ci-img]: https://travis-ci.org/uber-go/atomic.svg?branch=master
|
[ci-img]: https://travis-ci.org/uber-go/atomic.svg?branch=master
|
||||||
[ci]: https://travis-ci.org/uber-go/atomic
|
[ci]: https://travis-ci.org/uber-go/atomic
|
||||||
[cov-img]: https://coveralls.io/repos/github/uber-go/atomic/badge.svg?branch=master
|
[cov-img]: https://coveralls.io/repos/github/uber-go/atomic/badge.svg?branch=master
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
|
|
||||||
package atomic_test
|
package atomic
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/uber-go/atomic"
|
atomic "."
|
||||||
)
|
)
|
||||||
|
|
||||||
func Example() {
|
func Example() {
|
||||||
|
|||||||
18
glide.lock
generated
18
glide.lock
generated
@@ -1,9 +1,17 @@
|
|||||||
hash: 5db1b05d931e409a41d0ab37d40a2983587ad1819c0b22738d28a40a96dbcca3
|
hash: f14d51408e3e0e4f73b34e4039484c78059cd7fc5f4996fdd73db20dc8d24f53
|
||||||
updated: 2016-05-31T17:23:31.371153043-07:00
|
updated: 2016-10-27T00:10:51.16960137-07:00
|
||||||
imports:
|
imports: []
|
||||||
|
testImports:
|
||||||
|
- name: github.com/davecgh/go-spew
|
||||||
|
version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d
|
||||||
|
subpackages:
|
||||||
|
- spew
|
||||||
|
- name: github.com/pmezard/go-difflib
|
||||||
|
version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
|
||||||
|
subpackages:
|
||||||
|
- difflib
|
||||||
- name: github.com/stretchr/testify
|
- name: github.com/stretchr/testify
|
||||||
version: 8d64eb7173c7753d6419fd4a9caf057398611364
|
version: d77da356e56a7428ad25149ca77381849a6a5232
|
||||||
subpackages:
|
subpackages:
|
||||||
- assert
|
- assert
|
||||||
- require
|
- require
|
||||||
devImports: []
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package: github.com/uber-go/atomic
|
package: go.uber.org/atomic
|
||||||
import:
|
testImport:
|
||||||
# Test dependencies
|
|
||||||
- package: github.com/stretchr/testify
|
- package: github.com/stretchr/testify
|
||||||
subpackages:
|
subpackages:
|
||||||
- assert
|
- assert
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
COVER=cover
|
COVER=cover
|
||||||
ROOT_PKG=github.com/uber-go/atomic
|
ROOT_PKG=go.uber.org/atomic
|
||||||
|
|
||||||
if [[ -d "$COVER" ]]; then
|
if [[ -d "$COVER" ]]; then
|
||||||
rm -rf "$COVER"
|
rm -rf "$COVER"
|
||||||
|
|||||||
23
scripts/test-ubergo.sh
Executable file
23
scripts/test-ubergo.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# This script creates a fake GOPATH, symlinks in the current
|
||||||
|
# directory as uber-go/atomic and verifies that tests still pass.
|
||||||
|
|
||||||
|
WORK_DIR=`mktemp -d`
|
||||||
|
function cleanup {
|
||||||
|
rm -rf "$WORK_DIR"
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
||||||
|
export GOPATH="$WORK_DIR"
|
||||||
|
PKG_PARENT="$WORK_DIR/src/github.com/uber-go"
|
||||||
|
PKG_DIR="$PKG_PARENT/atomic"
|
||||||
|
|
||||||
|
mkdir -p "$PKG_PARENT"
|
||||||
|
ln -s `pwd` "$PKG_DIR"
|
||||||
|
cd "$PKG_DIR"
|
||||||
|
|
||||||
|
make test
|
||||||
Reference in New Issue
Block a user