diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..549618f --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +build: + go build -o bin/ +run: + go run . \ No newline at end of file diff --git a/app.go b/app.go index 49ea096..9525194 100644 --- a/app.go +++ b/app.go @@ -38,11 +38,12 @@ func NewApp() *Application { Sep := widget.NewSeparator() - SpotLabelDX := canvas.NewText("t", color.Black) - SpotLabelFreqMhz := canvas.NewText("t", color.Black) - SpotLabelBand := canvas.NewText("t", color.Black) + SpotLabelDX := canvas.NewText("DX: ", color.Black) + SpotLabelFreqMhz := canvas.NewText("Freq: ", color.Black) + SpotLabelBand := canvas.NewText("Band: ", color.Black) + Spot := container.NewHBox(SpotLabelDX, SpotLabelFreqMhz, SpotLabelBand) - content := container.NewVBox(servicesLabel, Sep, TCPClientAll, FlexRadioAll, Sep, SpotLabelDX, SpotLabelFreqMhz, SpotLabelBand) + content := container.NewVBox(servicesLabel, Sep, TCPClientAll, FlexRadioAll, Sep, Spot) w.SetContent(content) app := &Application{ diff --git a/config.go b/config.go index 2f01102..f42a67e 100644 --- a/config.go +++ b/config.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "log" "os" "gopkg.in/yaml.v2" @@ -51,13 +50,13 @@ func NewConfig(configPath string) *Config { file, err := os.Open(configPath) if err != nil { - log.Println("could not open config file") + Log.Errorln("could not open config file") } defer file.Close() d := yaml.NewDecoder(file) if err := d.Decode(&Cfg); err != nil { - log.Println("could not decod config file") + Log.Errorln("could not decod config file") } return Cfg diff --git a/main.go b/main.go index 8b5f072..60c442b 100644 --- a/main.go +++ b/main.go @@ -73,8 +73,6 @@ func main() { go TCPClient.StartClient() go TCPServer.StartServer() - Application.Start() - // Gracely closing all connextions if signal is received go func() { for sig := range sigCh { @@ -97,4 +95,6 @@ func main() { os.Exit(0) } }() + + Application.Start() }