Skip to content

Commit

Permalink
Add support for Nacos v2 SDK (#23)
Browse files Browse the repository at this point in the history
* fix:兼容了nacos-v2-go-sdk

* fix:兼容了nacos-v2-go-sdk

* fix:兼容了nacos-v2-go-sdk

* fix:兼容了nacos-v2-go-sdk

* fix:兼容了nacos-v2-go-sdk

* style: use gofumpt

* feat: add submoudle unittest

* feat: add submoudle unittest

* style: simple code

---------

Co-authored-by: kinggo <[email protected]>
  • Loading branch information
yuxialuozi and li-jin-gou committed Mar 3, 2024
1 parent 8375cb2 commit 698e368
Show file tree
Hide file tree
Showing 51 changed files with 2,989 additions and 1,652 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ jobs:
# https://golangci-lint.run/
uses: golangci/golangci-lint-action@v3
with:
version: latest
version: latest
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
unit-benchmark-test:
strategy:
matrix:
go: [ 1.17, 1.18, 1.19 ]
go: [ 1.20.1 ]
os: [ X64, ARM64 ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -28,5 +28,15 @@ jobs:
- name: Unit Test
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Unit Test V2
run: cd v2 && go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Lint V2
run: |
cd v2
go vet -stdmethods=false $(go list ./...)
go install mvdan.cc/[email protected]
test -z "$(gofumpt -l -extra .)"
- name: Benchmark
run: go test -bench=. -benchmem -run=none ./...
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
TOOLS_SHELL="./hack/tools.sh"

.PHONY: test
test:
@${TOOLS_SHELL} test
@echo "go test finished"



.PHONY: vet
vet:
@${TOOLS_SHELL} vet
@echo "vet check finished"
2 changes: 1 addition & 1 deletion client/circuit_breaker.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 CloudWeGo Authors
// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion client/retry.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 CloudWeGo Authors
// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion client/rpc_timeout.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 CloudWeGo Authors
// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion client/suite.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 CloudWeGo Authors
// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion example/client/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 CloudWeGo Authors
// Copyright 2024 CloudWeGo Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
66 changes: 0 additions & 66 deletions example/go.mod

This file was deleted.

Loading

0 comments on commit 698e368

Please sign in to comment.