LPUSHX
Syntax
LPUSHX key element [element ...]
Module
listCategories
fast list writeDescription
Prepends a value to the beginning of a list only if the list exists.
Examples
- Go (Embedded)
- CLI
Prepends a value to the beginning of a list only if the list exists:
vault, err := echovault.NewEchoVault()
if err != nil {
log.Fatal(err)
}
length, err := vault.LPushX("key", "element1", "element2")
Prepends a value to the beginning of a list only if the list exists:
> LPUSHX key element1 element2