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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user