No need to use globals as a separate package to avoid import cycles
This commit is contained in:
@@ -12,19 +12,20 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
UI *ui.Application
|
||||
UI *ui.Application
|
||||
Notify *NotificationServer
|
||||
)
|
||||
|
||||
func ConnectUI(a *ui.Application) {
|
||||
UI = a
|
||||
}
|
||||
|
||||
/* Notification Primitive */
|
||||
type Notification struct {
|
||||
*tview.Box
|
||||
Text string
|
||||
}
|
||||
|
||||
func ConnectUI(a *ui.Application) {
|
||||
UI = a
|
||||
}
|
||||
|
||||
/* Get A Pointer to A Notification Struct */
|
||||
func NewNotification(s string) *Notification {
|
||||
return &Notification{
|
||||
|
||||
Reference in New Issue
Block a user