method

Value.ListItem

Read one immutable list item without copying the list.

Example

go
tags := store.List(store.String("news"))
first, ok := tags.ListItem(0)

Arguments

ArgumentTypeDescription
indexintThe zero-based list position.

Returns

The item and true, or false for a non-list or an out-of-range index.

(Value, bool)

Full signature

func (value Value) ListItem(index int) (Value, bool)

Source store/value.go:177

Related types

  • Value

    An immutable scalar, object, list, or populated document value.

Related guides