summaryrefslogtreecommitdiff
path: root/linuxstatus/new.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-06 11:12:10 -0600
committerJeff Carr <[email protected]>2024-01-06 11:12:10 -0600
commitf6f5bdba4e982595ad1c12041d39f75e11792ef8 (patch)
tree89c5c4856fcec28bb28fe0be4a4706559b6a3979 /linuxstatus/new.go
parentc59247824f22cf62b1625f5eeea11b809374d7a0 (diff)
stepping through init on a window with state
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/new.go')
-rw-r--r--linuxstatus/new.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/linuxstatus/new.go b/linuxstatus/new.go
index 5788ee1..4ae57eb 100644
--- a/linuxstatus/new.go
+++ b/linuxstatus/new.go
@@ -9,29 +9,31 @@ import (
func New() *LinuxStatus {
if me != nil {
- log.Warn("You have done New() twice. You can only do this once")
+ log.Log(WARN, "You have done New() twice. You can only do this once")
return me
}
me = &LinuxStatus {
hidden: true,
ready: false,
}
+ me.ifmap = make(map[int]*IFtype)
+ me.ipmap = make(map[string]*IPtype)
return me
}
func (ls *LinuxStatus) InitWindow() {
if ! ls.Initialized() {
- log.Warn("LinuxStatus() is not initalized yet (no parent for the window?)")
+ log.Log(WARN, "not initalized yet (no parent for the window?)")
return
}
if ls.window != nil {
- log.Warn("You already have a window")
+ log.Log(WARN, "You already have a window")
ls.ready = true
return
}
- ls.ready = true
- log.Warn("Creating the Window")
+ log.Log(WARN, "Creating the Window")
ls.window = gadgets.NewBasicWindow(ls.parent, "Linux OS Details")
+ ls.ready = true
}