Skip to content

Commit

Permalink
hide terminal pop up on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Apr 7, 2018
1 parent 5795ac8 commit 4f87231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gateway_windows.go
Expand Up @@ -3,10 +3,12 @@ package gateway
import (
"net"

This comment has been minimized.

Copy link
@keyoneone

keyoneone Jun 16, 2018

Decrypt

"os/exec"
"syscall"
)

func DiscoverGateway() (ip net.IP, err error) {
routeCmd := exec.Command("route", "print", "0.0.0.0")
routeCmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
output, err := routeCmd.CombinedOutput()
if err != nil {
return nil, err
Expand Down

0 comments on commit 4f87231

Please sign in to comment.