choice

package
v1.17.5 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 1 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

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

func CheckSlice

func CheckSlice(choices, available []string) error

CheckSliceContains 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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