File tree Expand file tree Collapse file tree 11 files changed +51
-228
lines changed Expand file tree Collapse file tree 11 files changed +51
-228
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
21
21
"fmt"
22
22
"testing"
23
23
)
24
+
24
25
import (
25
26
"github.com/stretchr/testify/assert"
26
27
)
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ import (
23
23
)
24
24
25
25
import (
26
- "github.com/nacos-group/nacos-sdk-go/v2/ clients"
27
- "github.com/nacos-group/nacos-sdk-go/v2/ clients/config_client"
28
- "github.com/nacos-group/nacos-sdk-go/v2/ common/constant"
29
- "github.com/nacos-group/nacos-sdk-go/v2/ vo"
26
+ "github.com/nacos-group/nacos-sdk-go/clients"
27
+ "github.com/nacos-group/nacos-sdk-go/clients/config_client"
28
+ "github.com/nacos-group/nacos-sdk-go/common/constant"
29
+ "github.com/nacos-group/nacos-sdk-go/vo"
30
30
)
31
31
32
32
var (
@@ -120,13 +120,11 @@ func (n *NacosConfigClient) Close() {
120
120
n .activeCount --
121
121
if n .share {
122
122
if n .activeCount == 0 {
123
- n .client .CloseClient ()
124
123
n .client = nil
125
124
atomic .StoreUint32 (& n .valid , 0 )
126
125
delete (configClientPool .configClient , n .name )
127
126
}
128
127
} else {
129
- n .client .CloseClient ()
130
128
n .client = nil
131
129
atomic .StoreUint32 (& n .valid , 0 )
132
130
delete (configClientPool .configClient , n .name )
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import (
27
27
)
28
28
29
29
import (
30
- "github.com/nacos-group/nacos-sdk-go/v2/ common/constant"
31
- "github.com/nacos-group/nacos-sdk-go/v2/ vo"
30
+ "github.com/nacos-group/nacos-sdk-go/common/constant"
31
+ "github.com/nacos-group/nacos-sdk-go/vo"
32
32
33
33
"github.com/stretchr/testify/assert"
34
34
)
@@ -45,7 +45,7 @@ func TestStructAlign(t *testing.T) {
45
45
}
46
46
}
47
47
48
- //TestNewNacosConfigClient config client
48
+ // TestNewNacosConfigClient config client
49
49
func TestNewNacosConfigClient (t * testing.T ) {
50
50
51
51
scs := []constant.ServerConfig {* constant .NewServerConfig ("console.nacos.io" , 80 )}
@@ -89,7 +89,6 @@ func TestPublishConfig(t *testing.T) {
89
89
NotLoadCacheAtStart : true ,
90
90
LogDir : "/tmp/nacos/log" ,
91
91
CacheDir : "/tmp/nacos/cache" ,
92
- LogRollingConfig : & constant.ClientLogRollingConfig {MaxAge : 3 },
93
92
LogLevel : "debug" ,
94
93
}
95
94
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ import (
23
23
)
24
24
25
25
import (
26
- "github.com/nacos-group/nacos-sdk-go/v2/ clients"
27
- "github.com/nacos-group/nacos-sdk-go/v2/ clients/naming_client"
28
- "github.com/nacos-group/nacos-sdk-go/v2/ common/constant"
29
- "github.com/nacos-group/nacos-sdk-go/v2/ vo"
26
+ "github.com/nacos-group/nacos-sdk-go/clients"
27
+ "github.com/nacos-group/nacos-sdk-go/clients/naming_client"
28
+ "github.com/nacos-group/nacos-sdk-go/common/constant"
29
+ "github.com/nacos-group/nacos-sdk-go/vo"
30
30
)
31
31
32
32
var (
@@ -121,13 +121,11 @@ func (n *NacosNamingClient) Close() {
121
121
n .activeCount --
122
122
if n .share {
123
123
if n .activeCount == 0 {
124
- n .client .CloseClient ()
125
124
n .client = nil
126
125
atomic .StoreUint32 (& n .valid , 0 )
127
126
delete (namingClientPool .namingClient , n .name )
128
127
}
129
128
} else {
130
- n .client .CloseClient ()
131
129
n .client = nil
132
130
atomic .StoreUint32 (& n .valid , 0 )
133
131
delete (namingClientPool .namingClient , n .name )
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ import (
22
22
)
23
23
24
24
import (
25
- "github.com/nacos-group/nacos-sdk-go/v2/common/constant"
25
+ "github.com/nacos-group/nacos-sdk-go/common/constant"
26
+
26
27
"github.com/stretchr/testify/assert"
27
28
)
28
29
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ require (
9
9
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
10
10
github.com/k0kubun/pp v3.0.1+incompatible
11
11
github.com/mattn/go-isatty v0.0.14
12
- github.com/nacos-group/nacos-sdk-go/v2 v2 .1.2
12
+ github.com/nacos-group/nacos-sdk-go v1 .1.3
13
13
github.com/natefinch/lumberjack v2.0.0+incompatible
14
14
github.com/pkg/errors v0.9.1
15
15
github.com/shirou/gopsutil/v3 v3.22.2
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
29
29
import (
30
30
"github.com/pkg/errors"
31
+
31
32
"golang.org/x/crypto/blake2b"
32
33
)
33
34
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ import (
22
22
"strconv"
23
23
"strings"
24
24
"testing"
25
+ )
25
26
27
+ import (
26
28
"github.com/stretchr/testify/require"
27
29
)
28
30
Original file line number Diff line number Diff line change 17
17
18
18
package gxstrings
19
19
20
- import "testing"
20
+ import (
21
+ "testing"
22
+ )
21
23
22
24
func BenchmarkStrConvByteFast (b * testing.B ) {
23
25
var s = "gost"
You can’t perform that action at this time.
0 commit comments