45 ),
46 ghttp.CombineHandlers(
47 ghttp.VerifyRequest("GET", "/volumes-async/some-volume"),
48 ghttp.RespondWithJSONEncoded(http.StatusOK, volume.Volume{49 "some-volume",
50 "/some/path",
51 map[string]string{},
38 fakeBuild = new(dbfakes.FakeBuild)
39 fakeWorkerPool = new(execfakes.FakePool)
40
41 plan = atc.Plan{ArtifactInput: &atc.ArtifactInputPlan{34, "some-input-artifact-name"}} 42 step = exec.NewArtifactInputStep(plan, fakeBuild, fakeWorkerPool)
43 })
44
Composite literals of struct types imported from another package that do not use the field-keyed syntax are fragile because the addition of a new field (even if unexported) to the struct will cause compilation to fail.
For example,
type S struct {
A int
B int
}
func f() {
s := S{1, 2}
}
will cause errors later on, while
type S struct {
A int
B int
}
func f() {
s := S{A: 1, B: 2}
}
will not.