Skip to content

Commit f3cc252

Browse files
committed
add missing comment to func PtrByteSizeDefault()
1 parent 7e58730 commit f3cc252

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/pkg/utils/utils.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ func PtrStringDefault[T any](v *T, defaultValue string) string {
9999
return fmt.Sprintf("%v", *v)
100100
}
101101

102-
func PtrByteSizeDefault(size *int64, defaultString string) string {
102+
// PtrByteSizeDefault return the value of an in64 pointer to a string representation of bytesize. If the pointer is nil,
103+
// it returns the [defaultValue].
104+
func PtrByteSizeDefault(size *int64, defaultValue string) string {
103105
if size == nil {
104-
return defaultString
106+
return defaultValue
105107
}
106108
return bytesize.New(float64(*size)).String()
107109
}

0 commit comments

Comments
 (0)