Skip to content

Commit

Permalink
minor: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FMotalleb committed Jun 29, 2024
1 parent 6004c79 commit 1aca175
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions cmd/parser/cron_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ func (s *CronString) parseAsSpec(
logrus.Warnf("env var of key `%s`, value `%s`, is going to be replaced by `%s`", key, old, val)

Check warning on line 79 in cmd/parser/cron_string.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/cron_string.go#L77-L79

Added lines #L77 - L79 were not covered by tests
}
envTable[key] = val

Check warning on line 81 in cmd/parser/cron_string.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/cron_string.go#L81

Added line #L81 was not covered by tests

}
} else {
spec, err := l.exportSpec(matcher, envTable, parser)
Expand All @@ -89,7 +88,6 @@ func (s *CronString) parseAsSpec(
if spec != nil {
specs = append(specs, *spec)

Check warning on line 89 in cmd/parser/cron_string.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/cron_string.go#L88-L89

Added lines #L88 - L89 were not covered by tests
}

}
}
return specs, nil

Check warning on line 93 in cmd/parser/cron_string.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/cron_string.go#L93

Added line #L93 was not covered by tests
Expand Down
3 changes: 1 addition & 2 deletions cmd/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func writeOutput(cfg *parserConfig, result string) {
}

func readInCron(cfg *parserConfig) (*CronString, error) {
var str string = ""
if cfg.cronFile == "" {
return nil, errors.New("please provide a cron file path, usage: `--help`")

Check warning on line 68 in cmd/parser/parser.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/parser.go#L66-L68

Added lines #L66 - L68 were not covered by tests
}
Expand All @@ -81,7 +80,7 @@ func readInCron(cfg *parserConfig) (*CronString, error) {
if err != nil {
return nil, fmt.Errorf("can't open cron file: %v", err)

Check warning on line 81 in cmd/parser/parser.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/parser.go#L78-L81

Added lines #L78 - L81 were not covered by tests
}
str = string(content)
str := string(content)
cron := NewCronString(str)
return &cron, nil

Check warning on line 85 in cmd/parser/parser.go

View check run for this annotation

Codecov / codecov/patch

cmd/parser/parser.go#L83-L85

Added lines #L83 - L85 were not covered by tests
}
Expand Down

0 comments on commit 1aca175

Please sign in to comment.