Skip to main content

RPUSHX

Syntax

RPUSHX key element [element ...]

Module

list

Categories

fast list write

Description

Appends a value to the end of a list only if the list exists.

Examples

Appends a value to the end of a list only if the list exists:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
length, err := db.RPushX("key", "element1", "element2")