Compare commits

..

6 Commits

6 changed files with 9 additions and 12 deletions

View File

@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Go 1.21 - name: Set up Go 1.22
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: 1.21 go-version: 1.22
id: go id: go
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build - name: Build icecon binary
run: go build -v . run: go build -v ./cmd/icecon

View File

@ -98,10 +98,8 @@ func main() {
} }
// Which UI should be run? // Which UI should be run?
log.Println("Starting user interface.")
if err := ui.Run(rconClient, wantGui); err != nil { if err := ui.Run(rconClient, wantGui); err != nil {
log.Fatal("User interface failed:", err) log.Fatal("User interface failed:", err)
return return
} }
log.Println("Done.")
} }

View File

@ -3,8 +3,6 @@ package ui
import ( import (
"errors" "errors"
"fmt" "fmt"
"log"
"reflect"
"slices" "slices"
"github.com/icedream/icecon/internal/rcon" "github.com/icedream/icecon/internal/rcon"
@ -59,7 +57,6 @@ func Run(rconClient *rcon.Client, wantGraphical bool) error {
if err != nil { if err != nil {
return fmt.Errorf("failed to instantiate user interface: %w", err) return fmt.Errorf("failed to instantiate user interface: %w", err)
} }
log.Println("Found user interface:", reflect.TypeOf(ui))
return ui.Run() return ui.Run()
} }
return ErrNotSupported return ErrNotSupported

View File

@ -1,7 +1,8 @@
// This file was created by ui2walk and may be regenerated. // This file was created by ui2walk and may be regenerated.
// DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST! // DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST!
//+build windows //go:build windows
// +build windows
package windows package windows

View File

@ -1,7 +1,8 @@
// This file was created by ui2walk and may be regenerated. // This file was created by ui2walk and may be regenerated.
// DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST! // DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST!
//+build windows //go:build windows
// +build windows
package windows package windows

View File

@ -1,3 +1,3 @@
package windows package windows
//go:generate go run -mod=mod github.com/icedream/ui2walk //go:generate go run -mod=mod github.com/icedream/ui2walk -pkg $GOPACKAGE