method
Value.CopyList
Create a mutable slice containing the list items.
Example
tags := store.List(store.String("news"))
items, ok := tags.CopyList()
if ok {
items = append(items, store.String("go"))
tags = store.List(items...)
}Returns
A detached slice and a boolean reporting whether the value is a list.
([]Value, bool)How it works
Child Values remain immutable. Use Elements or ListItem for reads, and WithListItem for a single replacement.
Full signature
Related types
ValueAn immutable scalar, object, list, or populated document value.