chore: modernize the codebase using go 1.26 (#278)

This runs:

```
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./...
```

over the codebase, as this is using go 1.26, it can also use the new
new() functionallity so AsPtr and boolPtr is are needed anymore.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2026-03-21 21:16:09 +10:00
committed by GitHub
parent a5baf6e5c3
commit 2ab58d24d4
19 changed files with 82 additions and 101 deletions
+4 -6
View File
@@ -474,12 +474,10 @@ func toPushProgressEvent(jm jsonmessage.JSONMessage) *progress.Event {
percent := 0
if jm.Progress.Total > 0 {
percent = int(jm.Progress.Current * 100 / jm.Progress.Total)
// Cap percent at 100 to prevent index out of bounds in progress display.
// Docker can report Current > Total in some cases (e.g., compression).
if percent > 100 {
percent = 100
}
percent = min(
// Cap percent at 100 to prevent index out of bounds in progress display.
// Docker can report Current > Total in some cases (e.g., compression).
int(jm.Progress.Current*100/jm.Progress.Total), 100)
}
switch jm.Status {