Watch
1
0
Fork
You've already forked golang-github-cqroot-multichoose
0
No description
  • Go 98.6%
  • Makefile 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann a7d17dc09c
Setting go compatibility in rules.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-07-08 10:56:06 +02:00
.github Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
debian Setting go compatibility in rules. 2026-07-08 10:56:06 +02:00
go.mod Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
go.sum Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
LICENSE Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
Makefile Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
methods.go Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
multichoose.go Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
multichoose_test.go Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00
README.md Adding upstream version 0.1.1. 2026-01-25 20:17:38 +01:00

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))
}