kubenetworks/kubevpn

View on GitHub
pkg/tun/tun_darwin.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function createTun has 58 lines of code (exceeds 50 allowed). Consider refactoring.
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
    }
Severity: Minor
Found in pkg/tun/tun_darwin.go - About 1 hr to fix

    Function createTun has 10 return statements (exceeds 4 allowed).
    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
        }
    Severity: Major
    Found in pkg/tun/tun_darwin.go - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status