diff options
| author | Jeff Carr <[email protected]> | 2024-02-25 18:39:27 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-25 18:39:27 -0600 |
| commit | 40e811b3b39ffe8d6c2394dc024bb0770933683a (patch) | |
| tree | b6ce067128ed00ab8d5d6e8f2ddb1861684e6684 | |
| parent | 4641eceda817e822b1e4e096086a2227a04bb3fd (diff) | |
| -rw-r--r-- | new.go | 6 | ||||
| -rw-r--r-- | update.go | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -2,13 +2,12 @@ package linuxstatus import ( - "go.wit.com/gui" "go.wit.com/log" "go.wit.com/lib/gadgets" ) -func NewLinuxStatus(parent *gui.Node) *LinuxStatus { +func InitLinuxStatus() *LinuxStatus { if me != nil { log.Log(WARN, "You have done New() twice. You can only do this once") return me @@ -21,10 +20,9 @@ func NewLinuxStatus(parent *gui.Node) *LinuxStatus { me.ipmap = make(map[string]*IPtype) log.Log(WARN, "Creating the Window") - me.window = gadgets.NewBasicWindow(parent, "OS Hostname Details") + me.window = gadgets.RawBasicWindow("OS Hostname Details") me.window.Make() draw(me) - me.window.Draw() me.ready = true return me @@ -9,7 +9,9 @@ import ( ) func (ls *LinuxStatus) Update() { - if ls == nil { return } + if ls == nil { + return + } if !ls.Ready() { log.Log(WARN, "can't update yet. ready is false") log.Error(errors.New("Update() is not ready yet")) |
