arp
arp copied to clipboard
Windows version pops up a cmd window when the arp command is run
I am using this package with the fyne UI toolkit. When the arp command is execured via exec() it pops up a command window that goes away after the arp command is run. To resolve this issue, the following command must be run before doing the exec(): syscall.SysProcAttr{HideWindow: true}
The following snippet should fix the issue: func Table() ArpTable { cmd := exec.Command("arp", "-a") cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} var outb bytes.Buffer cmd.Stdout = &outb err := cmd.Run() data := outb.String()