more lint

This commit is contained in:
Bryce Lampe
2024-03-26 15:36:24 -07:00
parent d50d156bd8
commit cbf957533e
24 changed files with 832 additions and 242 deletions

View File

@@ -15,7 +15,7 @@
package internal
import (
"fmt"
"errors"
"io"
"os"
"path/filepath"
@@ -57,7 +57,7 @@ func (d *Dockerfile) Annotate(a infer.Annotator) {
func (d *Dockerfile) validate(preview bool, c Context) error {
if d.Location != "" && d.Inline != "" {
return newCheckFailure(
fmt.Errorf(`only specify "file" or "inline", not both`),
errors.New(`only specify "file" or "inline", not both`),
"dockerfile",
)
}
@@ -89,7 +89,7 @@ func (d *Dockerfile) validate(preview bool, c Context) error {
}
if !preview && !buildx.IsRemoteURL(c.Location) {
return newCheckFailure(fmt.Errorf("missing 'location' or 'inline'"), "dockerfile")
return newCheckFailure(errors.New("missing 'location' or 'inline'"), "dockerfile")
}
return nil