2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2026-06-22 12:26:07 +00:00

feat: add mac address support to qemu run command

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2026-06-18 15:37:31 +02:00
parent 58739c9f1b
commit 8d40bc255e
4 changed files with 21 additions and 3 deletions
+7
View File
@@ -51,6 +51,7 @@ type config struct {
qemuImgPath string
publishedPorts []PublishedPort
netdevConfig string
mac string
stdin io.Reader
stdout io.Writer
@@ -129,6 +130,12 @@ func WithPublishedPorts(ports ...PublishedPort) Option {
}
}
func WithMAC(mac string) Option {
return func(c *config) {
c.mac = mac
}
}
func WithStdin(r io.Reader) Option {
return func(c *config) {
c.stdin = r