Debian Codegraph @

/

debian golang-github-cqroot-multichoose 0.1.1-3debian golang-github-cqroot-multichoose-dev gomod github.com/cqroot/multichoose debiangomakemakefilemarkdownshellyaml 16 files · 95 symbols
View dependency graph

Depends on

README (full)

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))
}
dir .github/
dir debian/
file LICENSE
file Makefile
file README.md
file go.mod
file go.sum
file methods.go
file multichoose.go
file multichoose_test.go