Skip to content

Commit

Permalink
Merge pull request #49 from jolestar/dc/modfix
Browse files Browse the repository at this point in the history
Moved import to /v2 for gomod
  • Loading branch information
jolestar authored Nov 15, 2019
2 parents f765ef2 + e29eb48 commit 1a31e27
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v1

- name: Test
run: ./test
run: go test ./... -timeout 5m -race -coverprofile=coverage.txt -covermode=atomic

- name: Sumbit code cov
if: success()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
"strconv"
"sync/atomic"

"github.com/jolestar/go-commons-pool"
"github.com/jolestar/go-commons-pool/v2"
)

func Example_simple() {
Expand Down Expand Up @@ -99,7 +99,7 @@ import (
"strconv"
"sync/atomic"

"github.com/jolestar/go-commons-pool"
"github.com/jolestar/go-commons-pool/v2"
)

type MyPoolObject struct {
Expand Down
2 changes: 1 addition & 1 deletion collections/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"sync"

"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/concurrent"
)

// InterruptedErr when deque block method bean interrupted will return this err
Expand Down
2 changes: 1 addition & 1 deletion collections/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/concurrent"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion example__simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"sync/atomic"

"github.com/jolestar/go-commons-pool"
"github.com/jolestar/go-commons-pool/v2"
)

func Example_simple() {
Expand Down
2 changes: 1 addition & 1 deletion example_customFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"sync/atomic"

"github.com/jolestar/go-commons-pool"
"github.com/jolestar/go-commons-pool/v2"
)

type MyPoolObject struct {
Expand Down
2 changes: 1 addition & 1 deletion example_multipleBorrowers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"sync/atomic"

"github.com/jolestar/go-commons-pool"
"github.com/jolestar/go-commons-pool/v2"
)

func Example_multipleBorrowers() {
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module github.com/jolestar/go-commons-pool
module github.com/jolestar/go-commons-pool/v2

go 1.13

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fortytw2/leaktest v1.3.0
github.com/stretchr/testify v1.4.0
gopkg.in/yaml.v2 v2.2.5 // indirect
)
7 changes: 5 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/jolestar/go-commons-pool v2.0.0+incompatible h1:uHn5uRKsLLQSf9f1J5QPY2xREWx/YH+e4bIIXcAuAaE=
github.com/jolestar/go-commons-pool v2.0.0+incompatible/go.mod h1:ChJYIbIch0DMCSU6VU0t0xhPoWDR2mMFIQek3XWU0s8=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2 changes: 1 addition & 1 deletion object.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/jolestar/go-commons-pool/collections"
"github.com/jolestar/go-commons-pool/v2/collections"
)

// PooledObjectState is PooledObjectState enum const
Expand Down
6 changes: 3 additions & 3 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"
"time"

"github.com/jolestar/go-commons-pool/collections"
"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/collections"
"github.com/jolestar/go-commons-pool/v2/concurrent"
)

type baseErr struct {
Expand Down Expand Up @@ -594,7 +594,7 @@ func (pool *ObjectPool) evict(ctx context.Context) {

var idleSoftEvictTime = time.Duration(math.MaxInt64)
if pool.Config.SoftMinEvictableIdleTime > 0 {
idleSoftEvictTime = pool.Config.SoftMinEvictableIdleTime;
idleSoftEvictTime = pool.Config.SoftMinEvictableIdleTime
}
evictionConfig := EvictionConfig{
IdleEvictTime: idleEvictTime,
Expand Down
2 changes: 1 addition & 1 deletion pool_abandoned_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/concurrent"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion pool_perf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/concurrent"
)

type BenchObject struct {
Expand Down
4 changes: 2 additions & 2 deletions pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"time"

"github.com/fortytw2/leaktest"
"github.com/jolestar/go-commons-pool/collections"
"github.com/jolestar/go-commons-pool/concurrent"
"github.com/jolestar/go-commons-pool/v2/collections"
"github.com/jolestar/go-commons-pool/v2/concurrent"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
12 changes: 0 additions & 12 deletions test

This file was deleted.

0 comments on commit 1a31e27

Please sign in to comment.