No need to use globals as a separate package to avoid import cycles

This commit is contained in:
aditya-K2
2022-09-02 01:25:33 +05:30
parent 49c691e04e
commit 4ae005cbe7
10 changed files with 175 additions and 207 deletions

View File

@@ -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{