Android support for getting network addresses and interfaces (#1056)
* Replace unsupported network functions for android * Refactor default/android net addresses processing * Add default connection values, Refactor netenv * Fix compilation error * Combine network change default/android functions
This commit is contained in:
15
netenv/os_default.go
Normal file
15
netenv/os_default.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//go:build !android
|
||||
|
||||
package netenv
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
func osGetInterfaceAddrs() ([]net.Addr, error) {
|
||||
return net.InterfaceAddrs()
|
||||
}
|
||||
|
||||
func osGetNetworkInterfaces() ([]net.Interface, error) {
|
||||
return net.Interfaces()
|
||||
}
|
||||
Reference in New Issue
Block a user