12345678910111213141516171819202122232425 |
- package main
- import (
- _ "embed"
- "log"
- "red-green/door"
- "strings"
- )
- //go:embed growl.ans
- var growl string
- func ANSIGrowl() []string {
- data := strings.Split(growl, "\n")
- if !door.Unicode && !door.CP437 {
- log.Panicf("Call after door.Init() so Unicode/CP437 has been set.")
- }
- if door.Unicode {
- for idx := range data {
- data[idx] = door.CP437_to_Unicode(data[idx])
- }
- }
- return data
- }
|