diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-19 00:33:34 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-19 00:34:19 +0900 |
| commit | d1f83f40d6eb3458bb01d39cf6177d5e6285b27f (patch) | |
| tree | aa4fc2ea77590483ddc34dc7008670f3181fabf2 /helper | |
| parent | a748d40745611b471ee2a8dd79656aaa174eb03c (diff) | |
helper/bwrap: rename Write to WriteFile
In case this might want to be an io.Writer.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'helper')
| -rw-r--r-- | helper/bwrap/builder.go | 6 | ||||
| -rw-r--r-- | helper/bwrap/config_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/helper/bwrap/builder.go b/helper/bwrap/builder.go index e6685aa9..a9481921 100644 --- a/helper/bwrap/builder.go +++ b/helper/bwrap/builder.go @@ -63,10 +63,10 @@ func (c *Config) Bind(src, dest string, opts ...bool) *Config { } } -// Write copy from FD to destination DEST +// WriteFile copy from FD to destination DEST // (--file FD DEST) -func (c *Config) Write(dest string, payload []byte) *Config { - c.Filesystem = append(c.Filesystem, &DataConfig{Dest: dest, Data: payload, Type: DataWrite}) +func (c *Config) WriteFile(name string, data []byte) *Config { + c.Filesystem = append(c.Filesystem, &DataConfig{Dest: name, Data: data, Type: DataWrite}) return c } diff --git a/helper/bwrap/config_test.go b/helper/bwrap/config_test.go index d48f4f4c..e0f14511 100644 --- a/helper/bwrap/config_test.go +++ b/helper/bwrap/config_test.go @@ -113,7 +113,7 @@ func TestConfig_Args(t *testing.T) { }, { "copy", (new(bwrap.Config)). - Write("/.fortify/version", make([]byte, 8)). + WriteFile("/.fortify/version", make([]byte, 8)). CopyBind("/etc/group", make([]byte, 8)). CopyBind("/etc/passwd", make([]byte, 8), true), []string{ |
