control-panel-vpn/main.go

56 lines
918 B
Go

/*
Attempt to make a VPN
Take a look at: https://github.com/skx/simple-vpn
*/
package main
import (
"go.wit.com/log"
"go.wit.com/gui"
"go.wit.com/lib/gadgets"
)
var myGui *gui.Node
var win *gadgets.BasicWindow
func main() {
myGui = gui.New().Default()
myGui.LoadToolkit("andlabs")
helloworld()
log.Sleep(1)
win.Toggle()
log.Sleep(1)
win.Toggle()
log.Sleep(1)
win.Toggle()
// This is just a optional goroutine to watch that things are alive
gui.Watchdog()
}
// This creates a window
func helloworld() {
win = gadgets.NewBasicWindow(myGui, "helloworld golang wit/gui window")
win.Make()
win.Draw()
win.Box().NewButton("hello", func() {
log.Println("world")
hellosmart()
})
}
// This creates a window
func hellosmart() {
win := gadgets.NewBasicWindow(myGui, "helloworld golang wit/gui window")
win.Make()
win.Draw()
win.Box().NewButton("hello", func() {
log.Println("smart")
})
}