container/initplace: remove indirect method
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Hpkg (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 4m30s
Test / Sandbox (push) Successful in 1m24s
Test / Hakurei (race detector) (push) Successful in 5m20s
Test / Hakurei (push) Successful in 2m13s
Test / Flake checks (push) Successful in 1m29s
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Hpkg (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 4m30s
Test / Sandbox (push) Successful in 1m24s
Test / Hakurei (race detector) (push) Successful in 5m20s
Test / Hakurei (push) Successful in 2m13s
Test / Flake checks (push) Successful in 1m29s
This is no longer useful and is highly error-prone. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
8a91234cb4
commit
bff2a1e748
@ -22,15 +22,6 @@ func (f *Ops) Place(name *check.Absolute, data []byte) *Ops {
|
|||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
|
|
||||||
// PlaceP is like Place but writes the address of [TmpfileOp.Data] to the pointer dataP points to.
|
|
||||||
func (f *Ops) PlaceP(name *check.Absolute, dataP **[]byte) *Ops {
|
|
||||||
t := &TmpfileOp{Path: name}
|
|
||||||
*dataP = &t.Data
|
|
||||||
|
|
||||||
*f = append(*f, t)
|
|
||||||
return f
|
|
||||||
}
|
|
||||||
|
|
||||||
// TmpfileOp places a file on container Path containing Data.
|
// TmpfileOp places a file on container Path containing Data.
|
||||||
type TmpfileOp struct {
|
type TmpfileOp struct {
|
||||||
Path *check.Absolute
|
Path *check.Absolute
|
||||||
|
@ -82,18 +82,8 @@ func TestTmpfileOp(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
checkOpsBuilder(t, []opsBuilderTestCase{
|
checkOpsBuilder(t, []opsBuilderTestCase{
|
||||||
{"noref", new(Ops).Place(samplePath, sampleData), Ops{
|
{"full", new(Ops).Place(samplePath, sampleData), Ops{
|
||||||
&TmpfileOp{
|
&TmpfileOp{Path: samplePath, Data: sampleData},
|
||||||
Path: samplePath,
|
|
||||||
Data: sampleData,
|
|
||||||
},
|
|
||||||
}},
|
|
||||||
|
|
||||||
{"ref", new(Ops).PlaceP(samplePath, new(*[]byte)), Ops{
|
|
||||||
&TmpfileOp{
|
|
||||||
Path: samplePath,
|
|
||||||
Data: []byte{},
|
|
||||||
},
|
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user