Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Commit b2a79b7

Browse files
committed
update ping
1 parent 98b4c00 commit b2a79b7

178 files changed

Lines changed: 8737 additions & 3321 deletions

File tree

Some content is hidden

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

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,35 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
4949
# By default, queries listed here will override any specified in a config file.
5050
# Prefix the list here with "+" to use these queries and those in the config file.
51-
51+
5252
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5353
# queries: security-extended,security-and-quality
5454

55-
55+
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
58-
- name: Autobuild
59-
uses: github/codeql-action/autobuild@v2
58+
# - name: Autobuild
59+
# uses: github/codeql-action/autobuild@v2
6060

6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6363

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# If the Autobuild fails above, remove it and uncomment the following three lines.
6565
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6666

6767
# - run: |
6868
# echo "Run, Build Application using script"
6969
# ./location_of_script_within_repo/buildscript.sh
7070

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

.github/workflows/release.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,33 @@ jobs:
1515
- test
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Install Go
23-
uses: actions/setup-go@v3
23+
uses: actions/setup-go@v5
2424
with:
25-
go-version: 1.18
25+
go-version: 1.24
2626

2727
- name: Check config
28-
uses: goreleaser/goreleaser-action@v3
28+
uses: goreleaser/goreleaser-action@v6
2929
with:
30-
version: v1.13.1
30+
version: v2.8.2
3131
# version: latest
3232
args: check
3333

3434
- name: Run GoReleaser
35-
uses: goreleaser/goreleaser-action@v3
35+
uses: goreleaser/goreleaser-action@v6
3636
with:
37-
version: v1.13.1
37+
version: v2.8.2
3838
# version: latest
39-
args: release --rm-dist
39+
args: release --clean
4040
env:
4141
GITHUB_TOKEN: ${{ secrets.OPSCLI_TOKEN }}
4242

4343
- name: Delete older releases
44-
uses: dev-drprasad/delete-older-releases@v0.2.0
44+
uses: dev-drprasad/delete-older-releases@v0.3.4
4545
with:
4646
keep_latest: 1
4747
env:
@@ -52,17 +52,17 @@ jobs:
5252
needs: test
5353
steps:
5454
- name: Checkout
55-
uses: actions/checkout@v3
55+
uses: actions/checkout@v4
5656
with:
5757
fetch-depth: 0
5858

5959
- name: Install Go
60-
uses: actions/setup-go@v3
60+
uses: actions/setup-go@v5
6161
with:
62-
go-version: 1.18
62+
go-version: 1.24
6363

6464
- name: Install Docker Buildx
65-
uses: docker/setup-buildx-action@v2
65+
uses: docker/setup-buildx-action@v3.10.0
6666

6767
- name: Login to Docker Hub
6868
run: docker login -u zeyanlin -p ${{ secrets.DOCKERHUB }}
@@ -75,7 +75,7 @@ jobs:
7575
echo "date=$(date '+%Y-%m-%dT%H:%M:%SZ')">>$GITHUB_ENV
7676
7777
- name: Build and push
78-
uses: docker/build-push-action@v3
78+
uses: docker/build-push-action@v6.15.0
7979
with:
8080
context: .
8181
file: scripts/Dockerfile

.github/workflows/test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
goVersion:
35-
- 18
35+
- 24
3636
os:
3737
- macos
3838
- ubuntu
@@ -44,20 +44,20 @@ jobs:
4444
runs-on: ${{ matrix.os }}-latest
4545
steps:
4646
- name: "Install go1.${{ matrix.goVersion }}.x"
47-
uses: actions/setup-go@v3
47+
uses: actions/setup-go@v5
4848
with:
4949
go-version: 1.${{ matrix.goVersion }}.x
5050

5151
- name: Checkout
52-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5353
with:
5454
fetch-depth: 0
5555

5656
- name: golangci-lint
57-
uses: golangci/golangci-lint-action@v3
57+
uses: golangci/golangci-lint-action@v7.0.0
5858
with:
5959
args: --timeout=5m
60-
version: v1.48.0
60+
version: v2.0.2
6161

6262
go-test:
6363
needs:
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
goVersion:
69-
- 18
69+
- 24
7070
os:
7171
- macos
7272
- ubuntu
@@ -76,12 +76,12 @@ jobs:
7676
runs-on: ${{ matrix.os }}-latest
7777
steps:
7878
- name: "Install go1.${{ matrix.goVersion }}.x"
79-
uses: actions/setup-go@v3
79+
uses: actions/setup-go@v5
8080
with:
8181
go-version: 1.${{ matrix.goVersion }}.x
8282

8383
- name: Checkout
84-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
8585
with:
8686
fetch-depth: 0
8787

.golangci.yaml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
1+
# https://github.com/golangci/golangci-lint/blob/main/.golangci.reference.yml
2+
version: "2"
3+
14
run:
2-
go: "1.18"
5+
go: "1.24"
36
timeout: 3m
47

5-
linters-settings:
6-
cyclop:
7-
max-complexity: 30
8-
package-average: 10.0
9-
10-
errcheck:
11-
check-type-assertions: true
12-
13-
funlen:
14-
lines: 200
15-
statements: 100
168

17-
gocognit:
18-
min-complexity: 50
19-
20-
gosec:
21-
excludes:
22-
- G204 # Subprocess launched with a potential tainted input or cmd arguments # Use os/exec
23-
- G401 # Use of weak cryptographic primitive # md5, sha1
24-
- G501 # Blocklisted import crypto/md5: weak cryptographic primitive
25-
- G505 # Import blocklist: crypto/sha1
26-
27-
lll:
28-
line-length: 200
299

3010
linters:
31-
disable-all: true
11+
disable: # temporarily
12+
- errcheck
13+
- goconst
14+
- gosec
15+
- revive
16+
- govet
17+
- staticcheck
3218
enable:
3319
## enabled by default
34-
35-
- deadcode # Finds unused code
36-
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
37-
- gosimple # Linter for Go source code that specializes in simplifying a code
20+
# - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
3821
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
3922
- ineffassign # Detects when assignments to existing variables are not used
40-
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
41-
- structcheck # Finds unused struct fields
42-
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
23+
# - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks
4324
- unused # Checks Go code for unused constants, variables, functions and types
44-
- varcheck # Finds unused global variables and constants
4525

4626
## disabled by default
4727

@@ -55,24 +35,21 @@ linters:
5535
- durationcheck # check for two durations multiplied together
5636
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
5737
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
58-
- execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds
5938
- exhaustive # check exhaustiveness of enum switch statements
60-
- exportloopref # checks for pointers to enclosing loop variables
6139
# - forbidigo # Forbids identifiers
6240
- funlen # Tool for detection of long functions
6341
# - gochecknoglobals # check that no global variables exist
6442
# - gochecknoinits # Checks that no init functions are present in Go code
6543
- gocognit # Computes and checks the cognitive complexity of functions
66-
- goconst # Finds repeated strings that could be replaced by a constant
44+
# - goconst # Finds repeated strings that could be replaced by a constant
6745
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
6846
- gocyclo # Computes and checks the cyclomatic complexity of functions
6947
- godot # Check if comments end in a period
70-
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt.
7148
# - gomnd # An analyzer to detect magic numbers.
7249
- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
7350
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations.
7451
- goprintffuncname # Checks that printf-like functions are named with f at the end
75-
- gosec # Inspects source code for security problems
52+
# - gosec # Inspects source code for security problems
7653
- lll # Reports long lines
7754
- makezero # Finds slice declarations with non-zero initial length
7855
- nakedret # Finds naked returns in functions greater than a specified function length
@@ -85,11 +62,9 @@ linters:
8562
- nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL.
8663
- predeclared # find code that shadows one of Go's predeclared identifiers
8764
- promlinter # Check Prometheus metrics naming via promlint
88-
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
65+
# - revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
8966
- rowserrcheck # checks whether Err of rows is checked successfully
9067
- sqlclosecheck # Checks that sql.Rows and sql.Stmt are closed.
91-
- stylecheck # Stylecheck is a replacement for golint
92-
- tenv # tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
9368
- testpackage # linter that makes you use a separate _test package
9469
- tparallel # tparallel detects inappropriate usage of t.Parallel() method in your Go test codes
9570
- unconvert # Remove unnecessary type conversions
@@ -134,6 +109,30 @@ linters:
134109
#- interfacer # [deprecated] Linter that suggests narrower interface types
135110
#- maligned # [deprecated, replaced by govet fieldalignment] Tool to detect Go structs that would take less memory if their fields were sorted
136111
#- scopelint # [deprecated, replaced by exportloopref] Scopelint checks for unpinned variables in go programs
112+
settings:
113+
cyclop:
114+
max-complexity: 30
115+
package-average: 10.0
116+
117+
errcheck:
118+
check-type-assertions: true
119+
120+
funlen:
121+
lines: 200
122+
statements: 100
123+
124+
gocognit:
125+
min-complexity: 50
126+
127+
gosec:
128+
excludes:
129+
- G204 # Subprocess launched with a potential tainted input or cmd arguments # Use os/exec
130+
- G401 # Use of weak cryptographic primitive # md5, sha1
131+
- G501 # Blocklisted import crypto/md5: weak cryptographic primitive
132+
- G505 # Import blocklist: crypto/sha1
133+
134+
lll:
135+
line-length: 200
137136

138137
issues:
139138
max-same-issues: 10

.goreleaser.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# This is an example .goreleaser.yml file with some sensible defaults.
22
# Make sure to check the documentation at https://goreleaser.com
3+
# https://github.com/goreleaser/goreleaser/blob/main/.goreleaser.yaml
4+
5+
version: 2
36
env:
47
- GO111MODULE=on
58
- CGO_ENABLED=0
@@ -42,12 +45,11 @@ archives:
4245
wrap_in_directory: true
4346

4447
changelog:
45-
skip: true
46-
# sort: asc
47-
# filters:
48-
# exclude:
49-
# - "^docs:"
50-
# - "^test:"
48+
sort: asc
49+
filters:
50+
exclude:
51+
- "^docs:"
52+
- "^test:"
5153

5254
nfpms:
5355
- id: packages
@@ -90,6 +92,7 @@ nfpms:
9092
brews:
9193
- name: "{{ .ProjectName }}"
9294
homepage: https://github.com/linzeyan/homebrew-tools
93-
tap:
95+
license: Apache-2.0
96+
- repository:
9497
owner: linzeyan
9598
name: homebrew-tools

0 commit comments

Comments
 (0)