parent
76243308af
commit
d494f0fe47
7
main.go
7
main.go
|
@ -18,6 +18,7 @@ import "git.wit.com/wit/gui"
|
||||||
|
|
||||||
var GITCOMMIT string // this is passed in as an ldflag
|
var GITCOMMIT string // this is passed in as an ldflag
|
||||||
var GOVERSION string // this is passed in as an ldflag
|
var GOVERSION string // this is passed in as an ldflag
|
||||||
|
var BUILDTIME string // this is passed in as an ldflag
|
||||||
|
|
||||||
// import "github.com/davecgh/go-spew/spew"
|
// import "github.com/davecgh/go-spew/spew"
|
||||||
|
|
||||||
|
@ -37,9 +38,6 @@ var GOVERSION string // this is passed in as an ldflag
|
||||||
// several smart slice functions (new project. April 2019)
|
// several smart slice functions (new project. April 2019)
|
||||||
// https://github.com/elliotchance/pie
|
// https://github.com/elliotchance/pie
|
||||||
|
|
||||||
// Exit and write out the config
|
|
||||||
// (in yaml and json I guess.)
|
|
||||||
// switch to json once it can be made human readable
|
|
||||||
func onExit(err error) {
|
func onExit(err error) {
|
||||||
log.Println("Sleep for 1 second")
|
log.Println("Sleep for 1 second")
|
||||||
time.Sleep(1 * 1000 * 1000 * 1000)
|
time.Sleep(1 * 1000 * 1000 * 1000)
|
||||||
|
@ -103,6 +101,7 @@ func main() {
|
||||||
gui.Data.Version = "v0.5"
|
gui.Data.Version = "v0.5"
|
||||||
gui.Data.GitCommit = GITCOMMIT
|
gui.Data.GitCommit = GITCOMMIT
|
||||||
gui.Data.GoVersion = GOVERSION
|
gui.Data.GoVersion = GOVERSION
|
||||||
|
gui.Data.Buildtime = BUILDTIME
|
||||||
gui.Data.ButtonClick = buttonClick
|
gui.Data.ButtonClick = buttonClick
|
||||||
gui.Data.HomeDir = user.HomeDir
|
gui.Data.HomeDir = user.HomeDir
|
||||||
gui.Data.Debug = config.Bool("debugging")
|
gui.Data.Debug = config.Bool("debugging")
|
||||||
|
@ -180,6 +179,8 @@ func buttonClick(b *gui.ButtonMap) {
|
||||||
log.Println("LOGIN WAS OK!")
|
log.Println("LOGIN WAS OK!")
|
||||||
log.Println("LOGIN WAS OK!")
|
log.Println("LOGIN WAS OK!")
|
||||||
log.Println("LOGIN WAS OK!")
|
log.Println("LOGIN WAS OK!")
|
||||||
|
msg := "On account " + gui.Data.AccNick + "\n"
|
||||||
|
gui.ErrorWindow("Login OK", msg)
|
||||||
}
|
}
|
||||||
if (currentMessage.Type == pb.Event_FAIL) {
|
if (currentMessage.Type == pb.Event_FAIL) {
|
||||||
log.Println("LOGIN FAILED")
|
log.Println("LOGIN FAILED")
|
||||||
|
|
Loading…
Reference in New Issue