Skip to content

Commit

Permalink
Restyled by gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and 0x2b3bfa0 committed Jan 7, 2022
1 parent 71b9f77 commit 71129b7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
7 changes: 3 additions & 4 deletions task/common/machine/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io"
"path/filepath"
"strings"
"log"

_ "github.com/rclone/rclone/backend/azureblob"
_ "github.com/rclone/rclone/backend/googlecloudstorage"
Expand All @@ -21,9 +20,9 @@ import (
)

type StatusReport struct {
Result string
Status string
Code string
Result string
Status string
Code string
}

func Reports(ctx context.Context, remote, prefix string) ([]string, error) {
Expand Down
4 changes: 2 additions & 2 deletions task/common/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ type Status map[StatusCode]int
type StatusCode string

const (
StatusCodeActive StatusCode = "running"
StatusCodeActive StatusCode = "running"
StatusCodeSucceeded StatusCode = "succeeded"
StatusCodeFailed StatusCode = "failed"
StatusCodeFailed StatusCode = "failed"
)

type Size struct {
Expand Down
6 changes: 3 additions & 3 deletions task/k8s/resources/resource_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ func (j *Job) Read(ctx context.Context) error {
})
}
j.Attributes.Status = common.Status{
common.StatusCodeActive: int(job.Status.Active),
common.StatusCodeSucceeded: int(job.Status.Succeeded),
common.StatusCodeFailed: int(job.Status.Failed),
common.StatusCodeActive: int(job.Status.Active),
common.StatusCodeSucceeded: int(job.Status.Succeeded),
common.StatusCodeFailed: int(job.Status.Failed),
}
j.Resource = job
return nil
Expand Down
4 changes: 2 additions & 2 deletions task/task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func TestTask(t *testing.T) {

for assert.Nil(t, newTask.Read(ctx)) {
status, err := newTask.Status(ctx)
require.Nil(err)
require.Nil(t, err)
if status[common.StatusCodeActive] > 0 {
break
}
Expand All @@ -147,7 +147,7 @@ func TestTask(t *testing.T) {

for assert.Nil(t, newTask.Read(ctx)) {
status, err := newTask.Status(ctx)
require.Nil(err)
require.Nil(t, err)
if status[common.StatusCodeActive] == 0 {
break
}
Expand Down

0 comments on commit 71129b7

Please sign in to comment.