Skip to content

Commit 970d35d

Browse files
committed
Chore: update go 1.21
Signed-off-by: Fxzx micah <[email protected]>
1 parent 904cfc6 commit 970d35d

File tree

9 files changed

+21
-18
lines changed

9 files changed

+21
-18
lines changed

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@v2
22+
uses: github/codeql-action/init@v3
2323
with:
2424
languages: ${{ matrix.language }}
2525

2626
- name: Autobuild
27-
uses: github/codeql-action/autobuild@v2
27+
uses: github/codeql-action/autobuild@v3
2828

2929
- name: Perform CodeQL Analysis
30-
uses: github/codeql-action/analyze@v2
30+
uses: github/codeql-action/analyze@v3

.github/workflows/linter.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ jobs:
44
lint:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v3
7+
- uses: actions/checkout@v4
88

99
- name: Setup Go
10-
uses: actions/setup-go@v4
10+
uses: actions/setup-go@v5
1111
with:
1212
check-latest: true
13-
go-version: '1.20'
13+
go-version: '1.21'
1414

1515
- name: golangci-lint
16-
uses: golangci/golangci-lint-action@v3
16+
uses: golangci/golangci-lint-action@v4
1717
with:
1818
version: latest

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ jobs:
55
runs-on: windows-latest
66
steps:
77
- name: Setup Go
8-
uses: actions/setup-go@v4
8+
uses: actions/setup-go@v5
99
with:
1010
check-latest: true
11-
go-version: '1.20'
11+
go-version: '1.21'
1212

1313
- name: Check out code
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Cache go module
17-
uses: actions/cache@v3
17+
uses: actions/cache@v4
1818
with:
1919
path: |
2020
~/go/pkg/mod

.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ linters-settings:
2020
- prefix(github.com/Dreamacro/clash)
2121
- default
2222
staticcheck:
23-
go: '1.20'
23+
go: '1.21'

config/config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@ func parseNameServer(servers []string) ([]dns.NameServer, error) {
567567
addr, err = hostWithDefaultPort(u.Host, "853")
568568
dnsNetType = "tcp-tls" // DNS over TLS
569569
case "https":
570-
clearURL := url.URL{Scheme: "https", Host: u.Host, Path: u.Path}
571-
addr = clearURL.String()
570+
addrURL := url.URL{Scheme: "https", Host: u.Host, Path: u.Path}
571+
addr = addrURL.String()
572572
dnsNetType = "https" // DNS over HTTPS
573573
case "dhcp":
574574
addr = u.Host

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/fxzxmicah/clash-core
22

3-
go 1.20
3+
go 1.21
44

55
require github.com/Dreamacro/clash v1.15.0
66

go.sum

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/ra
2424
github.com/josharian/native v1.1.0 h1:uuaP0hAbW7Y4l0ZRQ6C9zfb7Mg1mbFKry/xzDAfmtLA=
2525
github.com/josharian/native v1.1.0/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
2626
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
27+
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
2728
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2829
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
2930
github.com/mdlayher/netlink v1.7.2-0.20221213171556-9881fafed8c7 h1:HSkXG1bE/qcRuuPlZ2Jyf0Od8HLxOowi7CzKQqNtWn4=
@@ -41,6 +42,7 @@ github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFu
4142
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4243
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
4344
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
45+
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
4446
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
4547
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
4648
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
@@ -81,6 +83,7 @@ golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
8183
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
8284
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
8385
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
86+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
8487
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
8588
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
8689
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

test/.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ linters-settings:
1313
- default
1414
- prefix(github.com/Dreamacro/clash)
1515
staticcheck:
16-
go: '1.20'
16+
go: '1.21'

test/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module clash-test
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/Dreamacro/clash v1.12.0

0 commit comments

Comments
 (0)