Skip to content

Commit

Permalink
Fix lint errors, add nogui linker flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rdnt committed Sep 12, 2023
1 parent 3434fa4 commit e156848
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions cmd/builder/build.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"github.com/spf13/cobra"
"runtime"

"github.com/spf13/cobra"

. "myst/pkg/builder/util"
)

Expand Down Expand Up @@ -49,7 +50,7 @@ var buildCmd = &cobra.Command{

Step("Building client", func() {
if runtime.GOOS == "windows" {
Run("go build -o build/client/client-$GOOS-$GOARCH.exe cmd/client/main.go")
Run("go build -ldflags \"-H=windowsgui\" -o build/client/client-$GOOS-$GOARCH.exe cmd/client/main.go")
} else {
Run("go build -o build/client/client-$GOOS-$GOARCH cmd/client/main.go")
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/signal"
"syscall"

"fyne.io/systray"
"github.com/namsral/flag"
Expand Down Expand Up @@ -54,7 +55,7 @@ func main() {
}

interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, os.Kill)
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)

done := make(chan bool, 1)

Expand Down Expand Up @@ -90,7 +91,6 @@ func onReady() {
go func() {
<-quit.ClickedCh
systray.Quit()
return
}()
}

Expand Down
2 changes: 1 addition & 1 deletion src/client/rest/generated/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/client/rest/generated/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/server/rest/generated/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/server/rest/generated/models.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e156848

Please sign in to comment.