File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ linters:
3838 - gofmt
3939 - gofumpt
4040 - goimports
41- - gomnd
41+ - mnd
4242 - gomodguard
4343 - goprintffuncname
4444 - gosec
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 88 "time"
99)
1010
11- //nolint:gomnd
11+ //nolint:mnd
1212func 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 )
You can’t perform that action at this time.
0 commit comments