fix!: use int64 for file sizes (#2397)

* fix!: use `int64` for file sizes

Unfortunately Go templates cannot unconditionally dereference pointers,
so we use a magic value of -1 instead of a nil pointer to indicate a
file size that doesn't exist. This also means having to change
surrounding code, for example the `humanize` function.

* Update `CHANGELOG.md`
This commit is contained in:
Joe Lim authored and GitHub committed 2026-02-26 00:38:09 +11:00
1 parent 9ab0fd4de0
commit 3637f5f3f8
11 files changed
+44 -51

No files matched your search

+2 -2
View File
@@ -255,7 +255,7 @@ func TestReadArrays(t *testing.T) {
func TestHumanize(t *testing.T) {
tests := []struct {
size uint64
size int64
expected string
}{
{0, "0B"},
@@ -298,7 +298,7 @@ func TestHumanize(t *testing.T) {
}
tests = []struct {
size uint64
size int64
expected string
}{
{0, "0B"},