Skip to content

Commit 355d050

Browse files
fix code
1 parent c774ff9 commit 355d050

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

code/go-key-value-storage-sqlite_go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ func (sqliteKeyValueStorage *sqliteKeyValueStorageStruct) Get(key string) ([]byt
2828
err := sqlitex.Execute(sqliteKeyValueStorage.conn, "SELECT value, counter, expires_at FROM record WHERE key = ?", &sqlitex.ExecOptions{
2929
Args: []any{key},
3030
ResultFunc: func(stmt *sqlite.Stmt) error {
31-
value, _ := io.ReadAll(stmt.ColumnReader(0))
31+
value := make([]byte, stmt.ColumnLen(0))
32+
stmt.ColumnBytes(0, value)
3233
counter := stmt.ColumnInt32(1)
3334
expiresAtUnix := stmt.ColumnInt64(2)
3435

0 commit comments

Comments
 (0)