diff options
| author | Jeff Carr <[email protected]> | 2024-01-03 12:40:31 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-03 12:40:31 -0600 |
| commit | e14770e94c9ec126a3d418d6d2b2f15ef8cf1607 (patch) | |
| tree | 12b223cbe9cb9c6ef98b23d8bf6ae96e2040b3d7 /examples/control-panel-digitalocean/main.go | |
| parent | 1324717de0a1ccd830ca34aa03e0faa9e6d93a83 (diff) | |
fixed stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'examples/control-panel-digitalocean/main.go')
| -rw-r--r-- | examples/control-panel-digitalocean/main.go | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/examples/control-panel-digitalocean/main.go b/examples/control-panel-digitalocean/main.go deleted file mode 100644 index 6506842..0000000 --- a/examples/control-panel-digitalocean/main.go +++ /dev/null @@ -1,64 +0,0 @@ -package main - -import ( - "go.wit.com/log" - "go.wit.com/gui" - "go.wit.com/control-panel-dns/digitalocean" -) - -var title string = "Cloud App" -var myGui *gui.Node -var myDo *digitalocean.DigitalOcean - -func main() { - // initialize a new GO GUI instance - myGui = gui.New().Default() - - // draw the main window - cloudApp(myGui) - - log.Sleep(1) - myDo = digitalocean.New(myGui) - myDo.Update() - myDo.Show() - - // This is just a optional goroutine to watch that things are alive - gui.Watchdog() - gui.StandardExit() -} - -func cloudApp(n *gui.Node) *gui.Node { - win := n.NewWindow(title) - - // make a group label and a grid - group := win.NewGroup("data").Pad() - grid := group.NewGrid("grid", 2, 1).Pad() - - grid.NewButton("New()", func () { - myDo = digitalocean.New(myGui) - }) - grid.NewLabel("initializes the DO golang gui package") - - grid.NewButton("Show", func () { - myDo.Show() - }) - grid.NewLabel("will show the DO window") - - grid.NewButton("Hide", func () { - myDo.Hide() - }) - grid.NewLabel("will hide the DO window") - - grid.NewButton("Update", func () { - myDo.Update() - }) - grid.NewLabel("polls DO via the API to find the state of all your droplets") - - grid.NewButton("Create", func () { - // myDo.Create("jcarr.wit.com") - digitalocean.InitCreateWindow() - }) - grid.NewLabel("makes a new droplet") - - return win -} |
