pkg/tun/tun_darwin.go
Function createTun
has 58 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func createTun(cfg Config) (conn net.Conn, itf *net.Interface, err error) {
if cfg.Addr == "" && cfg.Addr6 == "" {
err = fmt.Errorf("IPv4 address and IPv6 address can not be empty at same time")
return
}
Function createTun
has 10 return statements (exceeds 4 allowed). Open
Open
func createTun(cfg Config) (conn net.Conn, itf *net.Interface, err error) {
if cfg.Addr == "" && cfg.Addr6 == "" {
err = fmt.Errorf("IPv4 address and IPv6 address can not be empty at same time")
return
}