grokify/mogo

View on GitHub
os/osutil/osutil.go

Summary

Maintainability
A
1 hr
Test Coverage

Function AbsFilepath has 6 return statements (exceeds 4 allowed).
Open

func AbsFilepath(path string) (string, error) {
    path = strings.TrimSpace(path)
    if len(path) == 0 {
        return path, nil
    } else if filepath.IsAbs(path) {
Severity: Major
Found in os/osutil/osutil.go - About 40 mins to fix

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

    func CreateFileWithLines(filename string, lines []string, lineSuffix string, useBuffer bool) error {
        f, err := os.Create(filename)
        if err != nil {
            return err
        }
    Severity: Major
    Found in os/osutil/osutil.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status