Skip to content

Commit b067dc0

Browse files
committed
fix: ci
1 parent 0318d9e commit b067dc0

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

.github/workflows/go-coverage.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Set up Go
15-
uses: actions/setup-go@v2
15+
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.24.x
17+
go-version: '1.22.x'
1818

1919
- name: Check out code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Generate coverage report
2323
run: |
2424
go test -coverprofile=coverage.out ./...
2525
go tool cover -func=coverage.out
2626
2727
- name: Upload coverage to Codecov
28-
uses: codecov/codecov-action@v1
28+
uses: codecov/codecov-action@v3
2929
with:
3030
file: ./coverage.out
3131
fail_ci_if_error: false

.github/workflows/go-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Set up Go
15-
uses: actions/setup-go@v2
15+
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.24.x
17+
go-version: '1.22.x'
1818

1919
- name: Check out code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: golangci-lint
2323
uses: golangci/golangci-lint-action@v3

.github/workflows/go-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Set up Go
15-
uses: actions/setup-go@v2
15+
uses: actions/setup-go@v4
1616
with:
17-
go-version: 1.24.x
17+
go-version: '1.22.x'
1818

1919
- name: Check out code
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Get dependencies
2323
run: go mod download

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Go
2525
uses: actions/setup-go@v4
2626
with:
27-
go-version: '1.24.3'
27+
go-version: '1.22.x'
2828

2929
- name: Install swag
3030
run: go install github.com/swaggo/swag/cmd/swag@latest

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
1717

1818
- name: Set up Go
19-
uses: actions/setup-go@v2
19+
uses: actions/setup-go@v4
2020
with:
21-
go-version: 1.24.x
21+
go-version: '1.22.x'
2222

2323
- name: Run tests
2424
run: make test
2525

2626
- name: Create Release
2727
id: create_release
28-
uses: actions/create-release@v1
28+
uses: softprops/action-gh-release@v1
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
with:

validationutils/validationutils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,12 @@ func HasMaxLength(str string, maxLength int) bool {
206206
// 参数:
207207
// - value: 要验证的数值
208208
// - minValue: 最小值
209-
// - max: 最大值
209+
// - maxValue: 最大值
210210
//
211211
// 返回:
212212
// - bool: 是否在指定范围内
213-
func IsInRange(value, minValue, max int) bool {
214-
return value >= minValue && value <= max
213+
func IsInRange(value, minValue, maxValue int) bool {
214+
return value >= minValue && value <= maxValue
215215
}
216216

217217
// ContainsUppercase 验证字符串是否包含大写字母

0 commit comments

Comments
 (0)