mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-16 08:26:40 +00:00
Use gofmt to fmt & simplify
This commit is contained in:
parent
310be64c3b
commit
2de58d1f90
@ -305,7 +305,7 @@ func (e *engine) runJob(c context.Context, r *Task, updater *updater, client doc
|
|||||||
MemorySwappiness: -1,
|
MemorySwappiness: -1,
|
||||||
},
|
},
|
||||||
Volumes: map[string]struct{}{
|
Volumes: map[string]struct{}{
|
||||||
"/var/run/docker.sock": struct{}{},
|
"/var/run/docker.sock": {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ func (e *engine) runJobNotify(r *Task, client dockerclient.Client) error {
|
|||||||
MemorySwappiness: -1,
|
MemorySwappiness: -1,
|
||||||
},
|
},
|
||||||
Volumes: map[string]struct{}{
|
Volumes: map[string]struct{}{
|
||||||
"/var/run/docker.sock": struct{}{},
|
"/var/run/docker.sock": {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ func (w *worker) Build(name string, stdin []byte, pr bool) (_ int, err error) {
|
|||||||
Binds: []string{"/var/run/docker.sock:/var/run/docker.sock"},
|
Binds: []string{"/var/run/docker.sock:/var/run/docker.sock"},
|
||||||
},
|
},
|
||||||
Volumes: map[string]struct{}{
|
Volumes: map[string]struct{}{
|
||||||
"/var/run/docker.sock": struct{}{},
|
"/var/run/docker.sock": {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,19 +86,19 @@ func TestJobs(t *testing.T) {
|
|||||||
Status: model.StatusSuccess,
|
Status: model.StatusSuccess,
|
||||||
}
|
}
|
||||||
jobs := []*model.Job{
|
jobs := []*model.Job{
|
||||||
&model.Job{
|
{
|
||||||
BuildID: 1,
|
BuildID: 1,
|
||||||
Status: "success",
|
Status: "success",
|
||||||
ExitCode: 0,
|
ExitCode: 0,
|
||||||
Number: 1,
|
Number: 1,
|
||||||
},
|
},
|
||||||
&model.Job{
|
{
|
||||||
BuildID: 3,
|
BuildID: 3,
|
||||||
Status: "error",
|
Status: "error",
|
||||||
ExitCode: 1,
|
ExitCode: 1,
|
||||||
Number: 2,
|
Number: 2,
|
||||||
},
|
},
|
||||||
&model.Job{
|
{
|
||||||
BuildID: 5,
|
BuildID: 5,
|
||||||
Status: "pending",
|
Status: "pending",
|
||||||
ExitCode: 0,
|
ExitCode: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user