Init() is a better function name here
This commit is contained in:
parent
4641eceda8
commit
40e811b3b3
6
new.go
6
new.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue