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