Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved import to /v2 for gomod #49

Merged
merged 2 commits into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.