Ask

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsYourInfoCorrect  = "您填写的信息是否正确 (Is your info correct?)"
	DoYouWannaContinue = "您想要继续吗 (Do you wanna continue?)"
)

Variables

This section is empty.

Functions

func ForName

func ForName(msg string) (name string)

func ForSure

func ForSure(msg string) (name bool)

ForSure is func prompt and ask user to Confirm You can easily use it like this:

 if Ask.ForSure(Ask.IsYourInfoCorrect) {
	// yes
	} else {
 // no
 }

Types

type ChoiceAble

type ChoiceAble interface {
	UniqName() string
}

func ChoiceOneOfSlice

func ChoiceOneOfSlice(choice ChoiceAbleSlice) ChoiceAble

type ChoiceAbleSlice

type ChoiceAbleSlice []ChoiceAble

func ChoiceMultiOfSlice

func ChoiceMultiOfSlice(choices ChoiceAbleSlice) ChoiceAbleSlice

func ConvertToChoiceAbleSlice

func ConvertToChoiceAbleSlice[T ChoiceAble](cs []T) ChoiceAbleSlice

Jump to

Keyboard shortcuts

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