Update README.md

This commit is contained in:
lucus lee 2016-12-26 14:49:16 +09:00 committed by lucus
parent c4e1e4e0bc
commit 4faff02c97

View file

@ -182,18 +182,19 @@ func main() {
} }
``` ```
Same as Linux version, but you don't need to bring up the device by hand, the only thing you need is to assign an IP address to it. You will need admin right to assign IP. Same as Linux version, but you don't need to bring up the device by hand, the only thing you need is to assign an IP address to it.
```dos ```dos
go run main.go go run main.go
``` ```
If will output a lot of lines because of some windows services and dhcp. It will output a lot of lines because of some windows services and dhcp.
You will need admin right to assign IP.
In a new cmd (admin right): In a new cmd (admin right):
```dos ```dos
# Replace with your device name # Replace with your device name, it can be achieved by ifce.Name().
netsh interface ip set address name="Ehternet 2" source=static addr=10.1.0.10 mask=255.255.255.0 gateway=none netsh interface ip set address name="Ehternet 2" source=static addr=10.1.0.10 mask=255.255.255.0 gateway=none
``` ```