Skip to content

Commit 4ddb08e

Browse files
author
Lorenz Kästle
committed
Linter fix: make typecast explicit
1 parent 8860940 commit 4ddb08e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

internal/s3/bucket.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ type V2Output struct {
1616
}
1717

1818
func (v *V2Output) GetBucketOutput(size int64, status int) (output string) {
19+
var tmp_size uint64
20+
21+
if size >= 0 {
22+
tmp_size = uint64(size)
23+
}
24+
1925
output = fmt.Sprintf(" \\_[%s] %s - value: %s",
2026
check.StatusText(status),
2127
*v.V2Output.Name,
22-
convert.BytesIEC(size))
28+
convert.BytesIEC(tmp_size))
2329

2430
return
2531
}

internal/s3/object.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ import (
77
)
88

99
func (v *V2Output) GetObjectOutput(size int64, status int, path string) (output string) {
10+
var tmp_size uint64
11+
12+
if size >= 0 {
13+
tmp_size = uint64(size)
14+
}
15+
1016
output += fmt.Sprintf(" \\_[%s] %s: %s\n",
1117
check.StatusText(status),
1218
path,
13-
convert.BytesIEC(size))
19+
convert.BytesIEC(tmp_size))
1420

1521
return
1622
}

0 commit comments

Comments
 (0)