txn2/kubefwd

View on GitHub
pkg/fwdIp/fwdIp.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method ForwardIPOpts.MatchList has 77 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (o ForwardIPOpts) MatchList() []string {
    if o.ClusterN == 0 && o.NamespaceN == 0 {
        return []string{
            o.PodName,

Severity: Major
Found in pkg/fwdIp/fwdIp.go - About 2 hrs to fix

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

    func getForwardConfiguration(opts ForwardIPOpts) *ForwardConfiguration {
        if forwardConfiguration != nil {
            return forwardConfiguration
        }
    
    
    Severity: Major
    Found in pkg/fwdIp/fwdIp.go - About 35 mins to fix

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

      func ipFromString(ipStr string) (net.IP, error) {
          ipParts := strings.Split(ipStr, ".")
      
          octet0, err := strconv.Atoi(ipParts[0])
          if err != nil {
      Severity: Major
      Found in pkg/fwdIp/fwdIp.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status