Versions in this module Expand all Collapse all v1 v1.2.0 Nov 2, 2023 Changes in this version + func Selection(s S, n int) (S, error) v1.1.0 Oct 27, 2023 Changes in this version + var ErrChoiceIsEmpty = errors.New("can't choose from an empty slice") + func Choice(s S) (E, error) + func Integer(mn, mx T) (T, error) + func WeightedChoice(s []WeightedChoiceOption[T]) (T, error) + type WeightedChoiceOption struct + Option T + Weight uint Other modules containing this package github.com/couchbase/tools-common/utils/v2 github.com/couchbase/tools-common/utils/v3