main_gui.go 515 B

1234567891011121314151617181920212223
  1. //go:build gui
  2. // +build gui
  3. //go:generate goversioninfo -icon=windowsdata/resource/netmaker.ico -manifest=netclient.exe.manifest.xml -64=true -o=netclient.syso
  4. package main
  5. import (
  6. "github.com/gravitl/netmaker/netclient/config"
  7. "github.com/gravitl/netmaker/netclient/gui"
  8. "github.com/gravitl/netmaker/netclient/ncutils"
  9. )
  10. func init() {
  11. config.GuiActive = true
  12. config.GuiRun = func() {
  13. networks, err := ncutils.GetSystemNetworks()
  14. if err != nil {
  15. networks = []string{}
  16. }
  17. gui.Run(networks)
  18. }
  19. }