choice

package
v0.0.0-...-5655933 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package choice provides basic functions for working with plugin options that must be one of several values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(choice string, available []string) error

Check returns an error if a choice is not one of the available choices.

func CheckSlice

func CheckSlice(choices, available []string) error

CheckSlice returns an error if the choices is not a subset of available.

func Contains

func Contains(choice string, choices []string) bool

Contains return true if the choice in the list of choices.

func ContainsPrefix

func ContainsPrefix(choice string, choices []string) bool

Contains return true if the choice in the list of choices.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL