We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
func PtrByteSizeDefault()
1 parent 7e58730 commit f3cc252Copy full SHA for f3cc252
internal/pkg/utils/utils.go
@@ -99,9 +99,11 @@ func PtrStringDefault[T any](v *T, defaultValue string) string {
99
return fmt.Sprintf("%v", *v)
100
}
101
102
-func PtrByteSizeDefault(size *int64, defaultString string) string {
+// 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 {
105
if size == nil {
- return defaultString
106
+ return defaultValue
107
108
return bytesize.New(float64(*size)).String()
109
0 commit comments