Skip to content

Commit aed7a79

Browse files
authored
Merge branch 'main' into trace-span-customer-err
2 parents 9201385 + 5bcf5bb commit aed7a79

File tree

256 files changed

+8935
-1432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+8935
-1432
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,84 +4,4 @@ updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
interval: "daily"
8-
- package-ecosystem: "gomod"
9-
directory: "/contrib/config/apollo"
10-
schedule:
11-
interval: "weekly"
12-
- package-ecosystem: "gomod"
13-
directory: "/contrib/config/consul"
14-
schedule:
15-
interval: "weekly"
16-
- package-ecosystem: "gomod"
17-
directory: "/contrib/config/etcd"
18-
schedule:
19-
interval: "weekly"
20-
- package-ecosystem: "gomod"
21-
directory: "/contrib/config/kubernetes"
22-
schedule:
23-
interval: "weekly"
24-
- package-ecosystem: "gomod"
25-
directory: "/contrib/config/nacos"
26-
schedule:
27-
interval: "weekly"
28-
- package-ecosystem: "gomod"
29-
directory: "/contrib/encoding/msgpack"
30-
schedule:
31-
interval: "weekly"
32-
- package-ecosystem: "gomod"
33-
directory: "/contrib/log/aliyun"
34-
schedule:
35-
interval: "weekly"
36-
- package-ecosystem: "gomod"
37-
directory: "/contrib/log/zap"
38-
schedule:
39-
interval: "weekly"
40-
- package-ecosystem: "gomod"
41-
directory: "/contrib/log/fluent"
42-
schedule:
43-
interval: "weekly"
44-
- package-ecosystem: "gomod"
45-
directory: "/contrib/metrics/datadog"
46-
schedule:
47-
interval: "weekly"
48-
- package-ecosystem: "gomod"
49-
directory: "/contrib/metrics/prometheus"
50-
schedule:
51-
interval: "weekly"
52-
- package-ecosystem: "gomod"
53-
directory: "/contrib/opensergo"
54-
schedule:
55-
interval: "weekly"
56-
- package-ecosystem: "gomod"
57-
directory: "/contrib/registry/apollo"
58-
schedule:
59-
interval: "weekly"
60-
- package-ecosystem: "gomod"
61-
directory: "/contrib/registry/consul"
62-
schedule:
63-
interval: "weekly"
64-
- package-ecosystem: "gomod"
65-
directory: "/contrib/registry/etcd"
66-
schedule:
67-
interval: "weekly"
68-
- package-ecosystem: "gomod"
69-
directory: "/contrib/registry/kubernetes"
70-
schedule:
71-
interval: "weekly"
72-
- package-ecosystem: "gomod"
73-
directory: "/contrib/registry/nacos"
74-
schedule:
75-
interval: "weekly"
76-
- package-ecosystem: "gomod"
77-
directory: "/contrib/registry/zookeeper"
78-
schedule:
79-
interval: "weekly"
80-
- package-ecosystem: "gomod"
81-
directory: "/contrib/registry/eureka"
82-
schedule:
83-
interval: "weekly"
84-
- package-ecosystem: "gomod"
85-
directory: "/contrib/registry/polaris"
86-
schedule:
87-
interval: "weekly"
7+
interval: "monthly"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ Usage: `fixes/resolves #<issue number>`, or `fixes/resolves (paste link of issue
3535

3636
#### Other special notes for the reviewers:
3737
<!--
38-
* Somethings that need extra attention for the reviewers
38+
* Some things that need extra attention for the reviewers
3939
* Some additional notes, TODO list, etc.
4040
-->

.github/workflows/gitee-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Checkout source code
1515
uses: actions/checkout@v4
1616
- name: Mirror Github to Gitee
17-
uses: Yikun/hub-mirror-action@v1.4
17+
uses: Yikun/hub-mirror-action@v1.5
1818
with:
1919
src: github/go-kratos
2020
dst: gitee/go-kratos

.github/workflows/go.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
strategy:
1515
matrix:
16-
go: [ 1.20.x, 1.21.x, 1.22.x ]
16+
go: [1.22.x, 1.23.x, 1.24.x]
1717
name: build & test
1818
runs-on: ubuntu-latest
1919
services:
@@ -25,7 +25,7 @@ jobs:
2525
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
2626
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
2727
consul:
28-
image: consul:1.12.3
28+
image: hashicorp/consul:1.20
2929
ports:
3030
- 8500:8500
3131
nacos:
@@ -44,7 +44,7 @@ jobs:
4444
steps:
4545
- uses: actions/checkout@v4
4646
- name: Set up Go
47-
uses: actions/setup-go@v5.0.2
47+
uses: actions/setup-go@v5
4848
with:
4949
go-version: ${{ matrix.go }}
5050

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
- name: Lint
32-
uses: golangci/golangci-lint-action@v6
32+
uses: golangci/golangci-lint-action@v7
3333
with:
34-
version: v1.54.2
34+
version: v2.0
3535
working-directory: ${{ matrix.workdir }}
3636
skip-pkg-cache: true

.golangci.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
modules-download-mode: readonly
4-
54
linters:
6-
disable-all: true
7-
fast: false
5+
default: none
86
enable:
97
- bodyclose
108
- dogsled
119
- durationcheck
1210
- errcheck
13-
- exportloopref
14-
- govet
15-
- gosimple
16-
- gofmt
17-
- gofumpt
1811
- goconst
19-
- goimports
20-
- gomnd
2112
- gocyclo
13+
- govet
2214
- ineffassign
2315
- lll
16+
- misspell
17+
- mnd
2418
- prealloc
2519
- revive
2620
- staticcheck
27-
- typecheck
21+
- unconvert
2822
- unused
29-
- whitespace
3023
- wastedassign
31-
- unconvert
32-
- misspell
33-
34-
# don't enable:
35-
# - asciicheck
36-
# - scopelint
37-
# - gochecknoglobals
38-
# - gocognit
39-
# - godot
40-
# - godox
41-
# - goerr113
42-
# - interfacer
43-
# - maligned
44-
# - nestif
45-
# - prealloc
46-
# - testpackage
47-
# - stylrcheck
48-
# - wsl
49-
50-
linters-settings:
51-
govet:
52-
check-shadowing: true
53-
whitespace:
54-
multi-func: true
55-
lll:
56-
line-length: 160
57-
gomnd:
58-
# don't include the "operation", "argument" and "assign"
59-
checks:
60-
- case
61-
- condition
62-
- return
63-
goconst:
64-
ignore-tests: true
65-
gocyclo:
66-
# recommend 10-20
67-
min-complexity: 50
68-
goimports:
69-
local-prefixes: github.com/go-kratos # Put imports beginning with prefix after 3rd-party packages
70-
misspell: # Finds commonly misspelled English words in comments
71-
locale: US
24+
- whitespace
25+
settings:
26+
gocyclo:
27+
min-complexity: 50
28+
govet:
29+
enable:
30+
- shadow
31+
lll:
32+
line-length: 160
33+
misspell:
34+
locale: US
35+
mnd:
36+
checks:
37+
- case
38+
- condition
39+
- return
40+
whitespace:
41+
multi-func: true
42+
exclusions:
43+
generated: lax
44+
presets:
45+
- comments
46+
- common-false-positives
47+
- legacy
48+
- std-error-handling
49+
rules:
50+
- linters:
51+
- goconst
52+
path: (.+)_test\.go
53+
paths:
54+
- third_party$
55+
- builtin$
56+
- examples$
57+
formatters:
58+
enable:
59+
- gofmt
60+
- gofumpt
61+
- goimports
62+
settings:
63+
goimports:
64+
local-prefixes:
65+
- github.com/go-kratos
66+
exclusions:
67+
generated: lax
68+
paths:
69+
- third_party$
70+
- builtin$
71+
- examples$

Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
user := $(shell whoami)
22
rev := $(shell git rev-parse --short HEAD)
3-
os := $(shell expr substr $(shell uname -s) 1 5)
3+
os := $(shell uname)
44

55
# GOBIN > GOPATH > INSTALLDIR
66
# Mac OS X
7-
ifeq ($(shell uname),Darwin)
8-
GOBIN := $(shell echo ${GOBIN} | cut -d':' -f1)
7+
ifeq ($(os),Darwin)
8+
GOBIN := $(shell echo $(GOBIN) | cut -d':' -f1)
99
GOPATH := $(shell echo $(GOPATH) | cut -d':' -f1)
1010
endif
1111

1212
# Linux
1313
ifeq ($(os),Linux)
14-
GOBIN := $(shell echo ${GOBIN} | cut -d':' -f1)
14+
GOBIN := $(shell echo $(GOBIN) | cut -d':' -f1)
1515
GOPATH := $(shell echo $(GOPATH) | cut -d':' -f1)
1616
endif
1717

1818
# Windows
19-
ifeq ($(os),MINGW)
20-
GOBIN := $(subst \,/,$(GOBIN))
21-
GOPATH := $(subst \,/,$(GOPATH))
22-
GOBIN :=/$(shell echo "$(GOBIN)" | cut -d';' -f1 | sed 's/://g')
23-
GOPATH :=/$(shell echo "$(GOPATH)" | cut -d';' -f1 | sed 's/://g')
19+
ifneq ($(findstring MINGW,$(shell uname -s)),)
20+
GOBIN := $(shell echo "$(GOBIN)" | sed 's|\\|/|g' | cut -d';' -f1 | sed 's|^\([A-Za-z]\):|/\1|')
21+
GOPATH := $(shell echo "$(GOPATH)" | sed 's|\\|/|g' | cut -d';' -f1 | sed 's|^\([A-Za-z]\):|/\1|')
2422
endif
2523
BIN := ""
2624

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
<p align="center">
44
<a href="https://github.com/go-kratos/kratos/actions"><img src="https://github.com/go-kratos/kratos/workflows/Go/badge.svg" alt="Build Status"></a>
55
<a href="https://pkg.go.dev/github.com/go-kratos/kratos/v2"><img src="https://pkg.go.dev/badge/github.com/go-kratos/kratos/v2" alt="GoDoc"></a>
6+
<a href="https://deepwiki.com/go-kratos/kratos"><img src="https://img.shields.io/badge/DeepWiki-go--kratos%2Fkratos-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==" alt="DeepWiki"></a>
7+
<!-- DeepWiki badge generated by https://deepwiki.ryoppippi.com/ -->
68
<a href="https://codecov.io/gh/go-kratos/kratos"><img src="https://codecov.io/gh/go-kratos/kratos/master/graph/badge.svg" alt="codeCov"></a>
79
<a href="https://goreportcard.com/report/github.com/go-kratos/kratos"><img src="https://goreportcard.com/badge/github.com/go-kratos/kratos" alt="Go Report Card"></a>
810
<a href="https://github.com/go-kratos/kratos/blob/main/LICENSE"><img src="https://img.shields.io/github/license/go-kratos/kratos" alt="License"></a>
911
<a href="https://github.com/avelino/awesome-go"><img src="https://awesome.re/mentioned-badge.svg" alt="Awesome Go"></a>
1012
<a href="https://discord.gg/BWzJsUJ"><img src="https://img.shields.io/discord/766619759214854164?label=chat&logo=discord" alt="Discord"></a>
1113
</p>
1214
<p align="center">
15+
<a href="https://trendshift.io/repositories/3233" target="_blank"><img src="https://trendshift.io/api/badge/repositories/3233" alt="go-kratos%2Fkratos | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
1316
<a href="https://www.producthunt.com/posts/go-kratos?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-go-kratos" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=306565&theme=light" alt="Go Kratos - A Go framework for microservices. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
1417
</p>
1518

@@ -39,7 +42,7 @@ Kratos is accessible, powerful, and provides tools required for large, robust ap
3942

4043
Kratos has the most extensive and thorough [documentation](https://go-kratos.dev/en/docs/getting-started/start) and [example](https://github.com/go-kratos/examples) library of all modern web application frameworks, making it a breeze to get started with the framework.
4144

42-
We also provide a [modern template](https://github.com/go-kratos/kratos-layout). This template should help reduce the work required to setup up modern projects.
45+
We also provide a [modern template](https://github.com/go-kratos/kratos-layout). This template should help reduce the work required to set up modern projects.
4346

4447
### Goals
4548

0 commit comments

Comments
 (0)