Skip to content

Commit b2df2c0

Browse files
committed
Encode uuid in cursor storage instead of byte slice
1 parent df46554 commit b2df2c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/core_storage.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"fmt"
2424

2525
"context"
26+
2627
"github.com/cockroachdb/cockroach-go/crdb"
2728
"github.com/gofrs/uuid"
2829
"github.com/golang/protobuf/ptypes/timestamp"
@@ -34,7 +35,7 @@ import (
3435

3536
type storageCursor struct {
3637
Key string
37-
UserID []byte
38+
UserID uuid.UUID
3839
Read int32
3940
}
4041

@@ -286,7 +287,7 @@ func storageListObjects(rows *sql.Rows, cursor string) (*api.StorageObjectList,
286287
}
287288

288289
if lastObject.UserId != "" {
289-
newCursor.UserID = uuid.FromStringOrNil(lastObject.UserId).Bytes()
290+
newCursor.UserID = uuid.FromStringOrNil(lastObject.UserId)
290291
}
291292

292293
cursorBuf := new(bytes.Buffer)

0 commit comments

Comments
 (0)