Skip to content

Commit

Permalink
Enable ineffassign linter
Browse files Browse the repository at this point in the history
  • Loading branch information
dangra committed Aug 11, 2022
1 parent dd71c48 commit 6c5fb7d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ linters:
- goimports
- gosimple
- govet
# - ineffassign
- ineffassign
- staticcheck
- unconvert
- unused
Expand Down
73 changes: 0 additions & 73 deletions helpers/wrapper.go

This file was deleted.

3 changes: 1 addition & 2 deletions internal/command/machine/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,8 @@ func run(ctx context.Context) (err error) {

fmt.Fprintf(io.Out, "Wrote to fly.toml\n")

var deployNow bool = false

if !flag.GetBool(ctx, "no-deploy") && (srcInfo != nil && !srcInfo.SkipDeploy) {
var deployNow bool
if flag.GetBool(ctx, "now") {
deployNow = true
} else {
Expand Down
3 changes: 3 additions & 0 deletions internal/command/machine/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func runMachineStop(ctx context.Context) (err error) {
}

app, err := appFromMachineOrName(ctx, arg, appName)
if err != nil {
return fmt.Errorf("could not get app: %w", err)
}

flapsClient, err := flaps.New(ctx, app)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions logs/polling.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ func Poll(ctx context.Context, out chan<- LogEntry, client *api.Client, opts *Lo

func backoff(current, max time.Duration) (val time.Duration) {
if val = current << 1; current > max {
current = max
val = max
}

return
}

0 comments on commit 6c5fb7d

Please sign in to comment.