kubenetworks/kubevpn

View on GitHub
pkg/core/tunhandler.go

Summary

Maintainability
A
1 hr
Test Coverage

Function transportTun has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func transportTun(ctx context.Context, tunInbound <-chan *DataElem, tunOutbound chan<- *DataElem, packetConn net.PacketConn, routeMapUDP *RouteMap, routeMapTCP *sync.Map) error {
Severity: Minor
Found in pkg/core/tunhandler.go - About 45 mins to fix

    Function heartbeats has 5 return statements (exceeds 4 allowed).
    Open

    func heartbeats(ctx context.Context, tun net.Conn) {
        conn, err := util.GetTunDeviceByConn(tun)
        if err != nil {
            log.Errorf("Failed to get tun device: %s", err.Error())
            return
    Severity: Major
    Found in pkg/core/tunhandler.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status