Skip to content

Commit 2f5cf99

Browse files
committed
Linting
1 parent 17d6777 commit 2f5cf99

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

internal/checkpointer/checkpointer.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const (
3131
checkpointSubdirName = "checkpoint"
3232
)
3333

34-
var (
35-
errNoCheckpointDir = errors.New("Could not find checkpoint directory environment variable")
36-
)
34+
var errNoCheckpointDir = errors.New("Could not find checkpoint directory environment variable")
3735

3836
type FatalCheckpointErr struct {
3937
err error

internal/checkpointer/utils.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ import (
1212
"time"
1313
)
1414

15-
var (
16-
errTimedOutPolling = errors.New("Timed out while polling for file")
17-
)
15+
var errTimedOutPolling = errors.New("Timed out while polling for file")
1816

1917
// updateEnvVar updates an environment variable in-place, adding an item to it
2018
// if it exists or creating it if it doesn't exist
@@ -99,7 +97,7 @@ func downloadAndUntar(ctx context.Context, url, path string) error {
9997

10098
// pollForFileDeletion waits for a file to be deleted, up until a timeout. It returns an error if the
10199
// timeout is hit
102-
func pollForFileDeletion(target string, timeout time.Duration, pollInterval time.Duration) error {
100+
func pollForFileDeletion(target string, timeout, pollInterval time.Duration) error {
103101
deadline := time.After(timeout)
104102

105103
for {
@@ -120,7 +118,7 @@ func pollForFileDeletion(target string, timeout time.Duration, pollInterval time
120118

121119
// pollForFileExistance waits for a file to exist, up until a timeout. It returns an error if the
122120
// timeout is hit
123-
func pollForFileExistance(target string, timeout time.Duration, pollInterval time.Duration) error {
121+
func pollForFileExistance(target string, timeout, pollInterval time.Duration) error {
124122
deadline := time.After(timeout)
125123

126124
for {

0 commit comments

Comments
 (0)