Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 551 Bytes

README.md

File metadata and controls

29 lines (25 loc) · 551 Bytes

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