Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- uses: golangci/golangci-lint-action@v3
with:
version: v1.59.1
version: v1.64.5

go-mod-tidy:
runs-on: ubuntu-22.04
Expand Down
5 changes: 3 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ linters:
- asciicheck
- bidichk
- bodyclose
#- contextcheck
- copyloopvar
- dupl
- errorlint
- exportloopref
- gochecknoinits
- gocritic
- gofmt
Expand All @@ -18,7 +19,7 @@ linters:
- revive
- usestdlibvars
- unconvert
- tenv
#- usetesting
- tparallel
- wastedassign
- whitespace
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.21-alpine3.18
LINT_IMAGE = golangci/golangci-lint:v1.59.1
LINT_IMAGE = golangci/golangci-lint:v1.64.5

.PHONY: $(shell ls)

Expand Down
6 changes: 3 additions & 3 deletions ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ func (u *ui) drawScrollbar(vertical bool, fixedCoord int, start int,
}

scrollZone := (scrollbarMaxSize - scrollbarSize)
min := scrollbarMaxSize - pageSize
if min != 0 {
start += (scrollZone - scrollZone*(cur-min)/(-min))
minVal := scrollbarMaxSize - pageSize
if minVal != 0 {
start += (scrollZone - scrollZone*(cur-minVal)/(-minVal))
}

if vertical {
Expand Down
4 changes: 2 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ func randInt63n(n int64) (int64, error) {
return v & (n - 1), nil
}

max := int64((1 << 63) - 1 - (1<<63)%uint64(n))
maxVal := int64((1 << 63) - 1 - (1<<63)%uint64(n))

v, err := randInt63()
if err != nil {
return 0, err
}

for v > max {
for v > maxVal {
v, err = randInt63()
if err != nil {
return 0, err
Expand Down