Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Add Key String() function

chrislusf36a31771f113
diff --git a/go/storage/compact_map.go b/go/storage/compact_map.go
index ef0a3951f4..ff36219100 100644
--- a/go/storage/compact_map.go
+++ b/go/storage/compact_map.go
@@ -1,5 +1,7 @@
package storage
+import "strconv"
+
type NeedleValue struct {
Key Key
Offset uint32 `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G
@@ -12,6 +14,10 @@ const (
type Key uint64
+func (k Key) String() string {
+ return strconv.FormatUint(uint64(k), 10)
+}
+
type CompactSection struct {
values []NeedleValue
overflow map[Key]NeedleValue