Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
Signed-off-by: Noam Gal <[email protected]>
  • Loading branch information
ATGardner committed Oct 4, 2024
1 parent c4301f4 commit f131018
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func RunAppDelete(ctx context.Context, opts *AppDeleteOptions) error {
appDir := repofs.Join(store.Default.AppsDir, opts.AppName)
appExists := repofs.ExistsOrDie(appDir)
if !appExists {
return fmt.Errorf(util.Doc(fmt.Sprintf("application '%s' not found", opts.AppName)))
return errors.New(util.Doc(fmt.Sprintf("application '%s' not found", opts.AppName)))
}

var dirToRemove string
Expand All @@ -493,7 +493,7 @@ func RunAppDelete(ctx context.Context, opts *AppDeleteOptions) error {
appProjectDir := repofs.Join(appOverlaysDir, opts.ProjectName)
overlayExists := repofs.ExistsOrDie(appProjectDir)
if !overlayExists {
return fmt.Errorf(util.Doc(fmt.Sprintf("application '%s' not found in project '%s'", opts.AppName, opts.ProjectName)))
return errors.New(util.Doc(fmt.Sprintf("application '%s' not found in project '%s'", opts.AppName, opts.ProjectName)))
}

allOverlays, err := repofs.ReadDir(appOverlaysDir)
Expand Down
3 changes: 2 additions & 1 deletion cmd/commands/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package commands
import (
"context"
_ "embed"
"errors"
"fmt"
"os"
"time"
Expand Down Expand Up @@ -63,7 +64,7 @@ var (
if projectName != "" {
projExists := repofs.ExistsOrDie(repofs.Join(store.Default.ProjectsDir, projectName+".yaml"))
if !projExists {
return nil, nil, fmt.Errorf(util.Doc(fmt.Sprintf("project '%[1]s' not found, please execute `<BIN> project create %[1]s`", projectName)))
return nil, nil, errors.New(util.Doc(fmt.Sprintf("project '%[1]s' not found, please execute `<BIN> project create %[1]s`", projectName)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (f *factory) Wait(ctx context.Context, opts *WaitOptions) error {
timeout = opts.Timeout
}

return wait.PollImmediate(interval, timeout, func() (done bool, err error) {
return wait.PollUntilContextTimeout(ctx, interval, timeout, true, func(ctx context.Context) (done bool, err error) {
itr += 1
allReady := true

Expand Down

0 comments on commit f131018

Please sign in to comment.