diff --git a/internal/commands/update_release.go b/internal/commands/update_release.go index 003890f1a..d17a8445e 100644 --- a/internal/commands/update_release.go +++ b/internal/commands/update_release.go @@ -78,7 +78,6 @@ func (u UpdateRelease) Execute(args []string) error { StemcellOS: kilnfileLock.Stemcell.OS, GitHubRepository: releaseSpec.GitHubRepository, }, false) - if err != nil { if component.IsErrNotFound(err) { return fmt.Errorf("error finding the release: %w", err) @@ -99,7 +98,6 @@ func (u UpdateRelease) Execute(args []string) error { StemcellVersion: kilnfileLock.Stemcell.Version, GitHubRepository: releaseSpec.GitHubRepository, }) - if err != nil { if component.IsErrNotFound(err) { return fmt.Errorf("error finding the release: %w", err) diff --git a/internal/commands/update_stemcell.go b/internal/commands/update_stemcell.go index 128ec23f1..36992c79f 100644 --- a/internal/commands/update_stemcell.go +++ b/internal/commands/update_stemcell.go @@ -48,7 +48,6 @@ func (update UpdateStemcell) Execute(args []string) error { kilnStemcellVersion := kilnfile.Stemcell.Version releaseVersionConstraint, err = semver.NewConstraint(kilnStemcellVersion) - if err != nil { return fmt.Errorf("invalid stemcell constraint in kilnfile: %w", err) } diff --git a/pkg/cargo/validate.go b/pkg/cargo/validate.go index 11f79f519..e35067819 100644 --- a/pkg/cargo/validate.go +++ b/pkg/cargo/validate.go @@ -2,9 +2,10 @@ package cargo import ( "fmt" - "github.com/Masterminds/semver/v3" "slices" "text/template/parse" + + "github.com/Masterminds/semver/v3" ) type ValidationOptions struct { diff --git a/pkg/cargo/validate_test.go b/pkg/cargo/validate_test.go index d9b419278..53a2ee1d8 100644 --- a/pkg/cargo/validate_test.go +++ b/pkg/cargo/validate_test.go @@ -1,9 +1,10 @@ package cargo import ( - "github.com/stretchr/testify/require" "testing" + "github.com/stretchr/testify/require" + . "github.com/onsi/gomega" "github.com/stretchr/testify/assert" diff --git a/pkg/planitest/internal/config.go b/pkg/planitest/internal/config.go index 7e5b40463..4c3bb5cd6 100644 --- a/pkg/planitest/internal/config.go +++ b/pkg/planitest/internal/config.go @@ -43,7 +43,6 @@ func MergeAdditionalProductProperties(configFile io.Reader, additionalProperties var inputConfig ProductConfiguration err = yaml.Unmarshal(yamlInput, &inputConfig) - if err != nil { return nil, fmt.Errorf("could not parse config file: %s", err) } diff --git a/pkg/planitest/internal/om_runner.go b/pkg/planitest/internal/om_runner.go index 40fc80249..906bcb8be 100644 --- a/pkg/planitest/internal/om_runner.go +++ b/pkg/planitest/internal/om_runner.go @@ -89,7 +89,6 @@ func (o OMRunner) ResetAndConfigure(productName string, productVersion string, c "--product-name", productName, "--product-version", productVersion, ) - if err != nil { return fmt.Errorf("Unable to stage product %q, version %q: %s: %s", productName, productVersion, err, errOutput) @@ -114,7 +113,6 @@ func (o OMRunner) ResetAndConfigure(productName string, productVersion string, c "configure-product", "--config", configFile.Name(), ) - if err != nil { return fmt.Errorf("Unable to configure product %q: %s: %s", productName, err, errOutput) }