diff --git a/builder/qemu/builder.go b/builder/qemu/builder.go index 568e8c80d..eb38ba0c7 100644 --- a/builder/qemu/builder.go +++ b/builder/qemu/builder.go @@ -21,10 +21,10 @@ import ( const BuilderId = "transcend.qemu" var accels = map[string]struct{}{ - "none": {}, - "kvm": {}, - "tcg": {}, - "xen": {}, + "none": struct{}{}, + "kvm": struct{}{}, + "tcg": struct{}{}, + "xen": struct{}{}, } var netDevice = map[string]bool{ diff --git a/builder/qemu/builder_test.go b/builder/qemu/builder_test.go index 69442c01f..d2a1d1eba 100644 --- a/builder/qemu/builder_test.go +++ b/builder/qemu/builder_test.go @@ -497,7 +497,7 @@ func TestBuilderPrepare_QemuArgs(t *testing.T) { // Test with a good one config["qemuargs"] = [][]interface{}{ - {"foo", "bar", "baz"}, + []interface{}{"foo", "bar", "baz"}, } b = Builder{} @@ -510,7 +510,7 @@ func TestBuilderPrepare_QemuArgs(t *testing.T) { } expected := [][]string{ - {"foo", "bar", "baz"}, + []string{"foo", "bar", "baz"}, } if !reflect.DeepEqual(b.config.QemuArgs, expected) {