Skip to content

Commit b832b6e

Browse files
authored
update (#274)
1 parent 8fa7567 commit b832b6e

File tree

7 files changed

+48
-32
lines changed

7 files changed

+48
-32
lines changed

.devcontainer/devcontainer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"image": "mcr.microsoft.com/devcontainers/go:1-1.23-bookworm",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": [
6+
"golang.go",
7+
"eamodio.gitlens",
8+
"ms-vscode.makefile-tools"
9+
]
10+
}
11+
}
12+
}

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: go build -v ./...
3636

3737
- name: Test
38-
run: go test -race -coverprofile=cover.out ./...
38+
run: make ut-coverage
3939

4040
- name: Post Coverage
4141
uses: codecov/codecov-action@v2

Makefile

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
.PHONY: bench
2-
bench:
3-
@go test -bench=. -benchmem ./...
4-
5-
.PHONY: ut
6-
ut:
7-
@go test -tags=goexperiment.arenas -race ./...
8-
9-
.PHONY: setup
10-
setup:
11-
@sh ./.script/setup.sh
12-
13-
.PHONY: fmt
14-
fmt:
15-
@sh ./.script/goimports.sh
16-
17-
.PHONY: lint
18-
lint:
19-
@golangci-lint run -c .golangci.yml
20-
21-
.PHONY: tidy
22-
tidy:
23-
@go mod tidy -v
24-
25-
.PHONY: check
26-
check:
27-
@$(MAKE) fmt
1+
.PHONY: bench
2+
bench:
3+
@go test -bench=. -benchmem ./...
4+
5+
.PHONY: ut
6+
ut:
7+
@go test -tags=goexperiment.arenas -race ./...
8+
9+
.PHONY: ut-coverage
10+
ut-coverage:
11+
@go test -tags=goexperiment.arenas -race -coverprofile=cover.out ./...
12+
13+
.PHONY: setup
14+
setup:
15+
@sh ./.script/setup.sh
16+
17+
.PHONY: fmt
18+
fmt:
19+
@sh ./.script/goimports.sh
20+
21+
.PHONY: lint
22+
lint:
23+
@golangci-lint run -c .golangci.yml
24+
25+
.PHONY: tidy
26+
tidy:
27+
@go mod tidy -v
28+
29+
.PHONY: check
30+
check:
31+
@$(MAKE) fmt
2832
@$(MAKE) tidy

spi/testdata/user_service/a.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
package main
1515

1616
// 测试用
17-
//go:generate go build -race --buildmode=plugin -o a.so ./a.go
17+
//go:generate go build -race -tags=goexperiment.arenas --buildmode=plugin -o a.so ./a.go
1818

1919
type UserService struct{}
2020

spi/testdata/user_service2/a/a.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
//go:generate go build -race --buildmode=plugin -o ../a.so ./a.go
15+
//go:generate go build -race -tags=goexperiment.arenas --buildmode=plugin -o ../a.so ./a.go
1616

1717
package main
1818

spi/testdata/user_service2/b/b.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
//go:generate go build -race --buildmode=plugin -o ../b.so ./b.go
15+
//go:generate go build -race -tags=goexperiment.arenas --buildmode=plugin -o ../b.so ./b.go
1616
package main
1717

1818
// 测试用

spi/testdata/user_service3/a.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package main
1616

1717
// 测试用
1818

19-
//go:generate go build -race --buildmode=plugin -o a.so ./a.go
19+
//go:generate go build -race -tags=goexperiment.arenas --buildmode=plugin -o a.so ./a.go
2020

2121
type UserService struct{}
2222

0 commit comments

Comments
 (0)