Skip to content

Commit 0519f9e

Browse files
committed
chore(lint): upgrade to golangci-lint 1.61.0
Signed-off-by: Daniel Vérité <dverite@gmail.com>
1 parent 184938d commit 0519f9e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/linter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v6
2323
with:
24-
version: v1.54
24+
version: v1.61
2525

2626
yamllint:
2727
name: yamllint

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ linters:
3838
- gofmt
3939
- gofumpt
4040
- goimports
41-
- gomnd
41+
- mnd
4242
- gomodguard
4343
- goprintffuncname
4444
- gosec

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: detect-private-key
1212
- id: check-symlinks
1313
- repo: https://github.com/golangci/golangci-lint
14-
rev: v1.54.2
14+
rev: v1.61.0
1515
hooks:
1616
- id: golangci-lint
1717
- repo: https://github.com/Bahjat/pre-commit-golang

internal/infra/uuid7/uuid7.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99
)
1010

11-
//nolint:gomnd
11+
//nolint:mnd
1212
func FromTime(timestamp time.Time) string {
1313
// Convert timestamp to Unix time in milliseconds
1414
unixMillis := timestamp.UnixNano() / int64(time.Millisecond)
@@ -17,8 +17,8 @@ func FromTime(timestamp time.Time) string {
1717
// Ensure the slice is initially 8 bytes to accommodate the full uint64,
1818
// but we'll only use the last 6 bytes for the timestamp
1919
timeBytes := make([]byte, 8)
20-
binary.BigEndian.PutUint64(timeBytes, uint64(unixMillis))
21-
timeBytes = timeBytes[2:] // Keep the last 6 bytes
20+
binary.BigEndian.PutUint64(timeBytes, uint64(unixMillis)) //nolint:gosec
21+
timeBytes = timeBytes[2:] // Keep the last 6 bytes
2222

2323
// Generate random bytes for the rest of the UUID (10 bytes to make it a total of 16)
2424
randomBytes := make([]byte, 10)

0 commit comments

Comments
 (0)