vorteil/direktiv

View on GitHub
cmd/exec/cmd/utils.go

Summary

Maintainability
A
1 hr
Test Coverage

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

func pingNamespace() error {
    req, err := http.NewRequestWithContext(
        context.Background(),
        http.MethodGet,
        UrlPrefixV2,
Severity: Major
Found in cmd/exec/cmd/utils.go - About 35 mins to fix

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

    func SafeLoadFile(filePath string) (*bytes.Buffer, error) {
        buf := new(bytes.Buffer)
    
        if filePath == "" {
            // skip if filePath is empty
    Severity: Major
    Found in cmd/exec/cmd/utils.go - About 35 mins to fix

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

      func SafeLoadStdIn() (*bytes.Buffer, error) {
          buf := new(bytes.Buffer)
      
          fi, err := os.Stdin.Stat()
          if err != nil {
      Severity: Major
      Found in cmd/exec/cmd/utils.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status