示例#1
0
func main() {
	var ch int

	fmt.Print("Enter Password: "******"*")
	}
}
示例#2
0
func main() {
	var ch int

	fmt.Println("Press END to quit")
	for ch != 152 {
		// Good for special keys: Arrows, PgUp, PgDn, Home, End.
		ch = keyboard.ReadKey()
		fmt.Printf("[%d][%c]\n", ch, ch)
	}
}
示例#3
0
func main() {
	var ch int
	var pw []int

	fmt.Print("Enter Password: "******"%c", ECHO[len(pw)-1])
	}

	fmt.Println("\n")
}
示例#4
0
func main() {
	var ch int

	fmt.Print("Do you wish to continue? (Y/n): ")

	ch = keyboard.ReadKey()

	switch ch {
	case 89, 121:
		fmt.Print("Yes")
	case 78, 110:
		fmt.Print("No")
	default:
		fmt.Print("Yes")
	}

	fmt.Println("\n\n")
}