Skip to content

Commit

Permalink
Fix Go tip errors with self-import (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Oct 27, 2016
1 parent 0ab9959 commit 9e99152
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package atomic
package atomic_test

import (
"fmt"

atomic "."
"go.uber.org/atomic"
)

func Example() {
Expand Down
9 changes: 6 additions & 3 deletions scripts/test-ubergo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -euo pipefail
set -euox pipefail
IFS=$'\n\t'

# This script creates a fake GOPATH, symlinks in the current
Expand All @@ -17,7 +17,10 @@ PKG_PARENT="$WORK_DIR/src/github.com/uber-go"
PKG_DIR="$PKG_PARENT/atomic"

mkdir -p "$PKG_PARENT"
ln -s `pwd` "$PKG_DIR"
cp -R `pwd` "$PKG_DIR"
cd "$PKG_DIR"

make test
# The example imports go.uber.org, fix the import.
sed -e 's/go.uber.org\/atomic/github.com\/uber-go\/atomic/' -i="" example_test.go

make test

0 comments on commit 9e99152

Please sign in to comment.