Skip to content
/ yon Public

Go module to prompt user with a yes or no question

License

Notifications You must be signed in to change notification settings

MeztliRA/yon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yon

Go Reference

Go module to prompt user with a yes or no question

example

package main

import (
	"fmt"

	"github.com/MeztliRA/yon"
)

func main() {
	answer1 := yon.Prompt("Do you think Go is a good language")
	if answer1 == yon.Yes {
		fmt.Println("ahh")
	} else {
		fmt.Println("umm")
	}
	answer2 := yon.Promptln("Do you think Go is a bad language")
	if answer2 == yon.No {
		fmt.Println("ahh")
	} else {
		fmt.Println("umm")
	}
}