netdata/netdata

View on GitHub
src/go/collectors/go.d.plugin/pkg/logs/reader.go

Summary

Maintainability
A
1 hr
Test Coverage

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

func Open(path string, excludePath string, log *logger.Logger) (*Reader, error) {
    var err error
    if path, err = filepath.Abs(path); err != nil {
        return nil, err
    }
Severity: Major
Found in src/go/collectors/go.d.plugin/pkg/logs/reader.go - About 35 mins to fix

    Method Reader.open has 5 return statements (exceeds 4 allowed).
    Open

    func (r *Reader) open() error {
        path := r.findFile()
        if path == "" {
            r.log.Debugf("couldn't find log file, used path: '%s', exclude_path: '%s'", r.path, r.excludePath)
            return ErrNoMatchedFile
    Severity: Major
    Found in src/go/collectors/go.d.plugin/pkg/logs/reader.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status