Skip to main content

RPUSH

Syntax

RPUSH key element [element ...]

Module

list

Categories

fast list write

Description

Prepends one or more values to the end of a list, creates the list if it does not exist.

Examples

Prepends one or more values to the end of a list, creates the list if it does not exist:

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