My go language program prints "Bad value for option -n 1, valid range is from 1 to 4294967295." when trying to ping using below code snippet
result , err := exec.Command("ping","-n 1", "-w 1", ip).Output()
fmt.Printf("%s
", result)
When doing it from cmd in Win i.e. 'ping -n 1 -w 1 8.8.8.8' is fine