kubenetworks/kubevpn

View on GitHub
pkg/util/kube.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function ConvertK8sApiServerToDomain has 69 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func ConvertK8sApiServerToDomain(kubeConfigPath string) (newPath string, err error) {
    var kubeConfigBytes []byte
    kubeConfigBytes, err = os.ReadFile(kubeConfigPath)
    if err != nil {
        return
Severity: Minor
Found in pkg/util/kube.go - About 1 hr to fix

    Function ConvertK8sApiServerToDomain has 15 return statements (exceeds 4 allowed).
    Open

    func ConvertK8sApiServerToDomain(kubeConfigPath string) (newPath string, err error) {
        var kubeConfigBytes []byte
        kubeConfigBytes, err = os.ReadFile(kubeConfigPath)
        if err != nil {
            return
    Severity: Major
    Found in pkg/util/kube.go - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status