mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
refactor: small improvement on if stmt
Inverted if statements are harder to read. No need for that.
This commit is contained in:
parent
9a9b9373a2
commit
03aec11c60
@ -50,10 +50,10 @@ func checkMain(ctx *context.Context, build config.Build) error {
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to parse file: %s", build.Main)
|
||||
}
|
||||
if !hasMain(file) {
|
||||
return fmt.Errorf("build for %s does not contain a main function", build.Binary)
|
||||
if hasMain(file) {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
return fmt.Errorf("build for %s does not contain a main function", build.Binary)
|
||||
}
|
||||
var dir = build.Main
|
||||
if dir == "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user