You've already forked getidev
Compare commits
1 Commits
1181a47282
...
5f55a75aed
Author | SHA1 | Date | |
---|---|---|---|
5f55a75aed
|
7
main.go
7
main.go
@ -8,6 +8,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var version string
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
ips := os.Args[1:]
|
ips := os.Args[1:]
|
||||||
switch {
|
switch {
|
||||||
@ -32,10 +34,7 @@ func main() {
|
|||||||
|
|
||||||
for _, addr := range addrs {
|
for _, addr := range addrs {
|
||||||
if strings.Split(addr.String(), "/")[0] == ip {
|
if strings.Split(addr.String(), "/")[0] == ip {
|
||||||
_, err = fmt.Fprintln(os.Stdout, iface.Name)
|
fmt.Fprintln(os.Stdout, iface.Name)
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err.Error())
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user