Skip to content

cqroot/multichoose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MultiChoose

Store multi-choose list state for Go.

Usage

package main

import (
	"fmt"

	"github.com/cqroot/multichoose"
)

func main() {
	mc := multichoose.New(10)

	// Set the maximum number of items that can be selected
	mc.SetLimit(3)

	mc.Select(1)
	// true
	fmt.Println(mc.IsSelected(1))

	mc.Deselect(1)
	// false
	fmt.Println(mc.IsSelected(1))
}

About

Store multi-choose list state for Go.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors