-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.go
44 lines (40 loc) · 1.1 KB
/
ui.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package gpsinfo
const (
// ansi terminal color definitions
_OFF = "\033[0m"
_RED = "\033[2;31m"
_GREEN = "\033[2;32m"
_YELLOW = "\033[2;33m"
_BLUE = "\033[2;34m"
_MAGENTA = "\033[2;35m"
_CYAN = "\033[2;36m"
_WHITE = "\033[2;37m"
_GREY = "\033[2;90m"
_ALERT = "\033[1;31m" // red alert
_ALERT_G = "\033[1;32m" // green alert
// some very generic terminal ui _defaults
_cleanNewline = "\n" + _OFF
_alert = _ALERT + "[-= ***! ALERT !*** =-]" + _OFF
_ok = _ALERT_G + "[OK]" + _OFF
_progress = _OFF + "[" + _GREY + "-= information colletion in _progress =-" + _OFF + "]"
_defaults = _OFF + "[" + _GREY + "-= information not (yet) emitted from device =-" + _OFF + "]"
_defaultsShort = _GREY + "n/a" + _OFF
_sectionLine = _WHITE + "##########################################################################################################\n" + _OFF
)
//
// Little Helper
//
// pad ...
func pad(in string) string {
for len(in) < 48 {
in += " "
}
return in
}
// padS ...
func padS(in string) string {
for len(in) < 15 {
in += " "
}
return in
}