prox5/util.go

22 lines
356 B
Go
Raw Normal View History

2022-05-23 01:05:50 +00:00
package prox5
2021-09-13 08:30:49 +00:00
import (
2022-05-30 10:42:18 +00:00
"git.tcp.direct/kayos/common/entropy"
2021-09-13 08:30:49 +00:00
)
const (
grn = "\033[32m"
2021-09-24 19:07:56 +00:00
red = "\033[31m"
ylw = "\033[33m"
rst = "\033[0m"
)
2021-12-04 17:17:07 +00:00
// randStrChoice returns a random element from the given string slice.
2021-09-13 15:12:02 +00:00
func randStrChoice(choices []string) string {
2022-05-30 10:42:18 +00:00
return entropy.RandomStrChoice(choices)
}
func randSleep() {
2022-05-30 10:42:18 +00:00
entropy.RandSleepMS(200)
2021-09-13 08:30:49 +00:00
}