Exemple #1
0
func main() {
	var ch int

	fmt.Print("Enter Password: "******"*")
	}
}
Exemple #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)
	}
}
Exemple #3
0
func main() {
	var ch int
	var pw []int

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

	fmt.Println("\n")
}
Exemple #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")
}