Skip to main content

LSET

Syntax

LSET key index element

Module

list

Categories

fast list write

Description

Sets the value of an element in a list by its index.

Examples

Sets the value of an element in a list by its index:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
ok, err := db.LSet("key", 2, "element")