testdoor.go 507 B

1234567891011121314151617181920212223
  1. package main
  2. import (
  3. "fmt"
  4. "red-green/door"
  5. )
  6. func main() {
  7. fmt.Println("Starting testdoor.go")
  8. d := door.Door{}
  9. d.Init()
  10. reset := door.Reset
  11. bold := door.Color(1, 37, 40)
  12. bolder := door.ColorText("BLI BOLD YEL ON BLUE")
  13. d.Write("Welcome to " + bolder + "door32.sys" + reset + "\n\r...\n\r")
  14. key := d.Getch()
  15. message := fmt.Sprintf("Key %s%d / %x%s\n\r", bold, key, key, reset)
  16. d.Write(message)
  17. d.Write("Returning you to the BBS...\n\r")
  18. d.SleepKey(3)
  19. fmt.Println("Ending testdoor.go")
  20. }