Format code with `gofmt -s -w`
This commit is contained in:
parent
817957fe4f
commit
d2a9e6b32e
|
@ -93,7 +93,7 @@ func TestStepRegisterAmi_buildRegisterOptsFromScratch(t *testing.T) {
|
|||
FromScratch: true,
|
||||
PackerConfig: common.PackerConfig{},
|
||||
AMIMappings: []amazon.BlockDevice{
|
||||
amazon.BlockDevice{
|
||||
{
|
||||
DeviceName: rootDeviceName,
|
||||
},
|
||||
},
|
||||
|
@ -168,7 +168,7 @@ func TestStepRegisterAmi_buildRegisterOptFromExistingImageWithBlockDeviceMapping
|
|||
FromScratch: false,
|
||||
PackerConfig: common.PackerConfig{},
|
||||
AMIMappings: []amazon.BlockDevice{
|
||||
amazon.BlockDevice{
|
||||
{
|
||||
DeviceName: rootDeviceName,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@ func (s *StepAMIRegionCopy) DeduplicateRegions(intermediary bool) {
|
|||
}
|
||||
|
||||
// Now print all those keys into the region slice again
|
||||
for k, _ := range RegionMap {
|
||||
for k := range RegionMap {
|
||||
RegionSlice = append(RegionSlice, k)
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ func (m *mockEC2Conn) DescribeVpcs(input *ec2.DescribeVpcsInput) (*ec2.DescribeV
|
|||
|
||||
output := &ec2.DescribeVpcsOutput{
|
||||
Vpcs: []*ec2.Vpc{
|
||||
&ec2.Vpc{IsDefault: aws.Bool(isDefault),
|
||||
{IsDefault: aws.Bool(isDefault),
|
||||
VpcId: aws.String(vpcID),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -165,12 +165,12 @@ func TestBuilderPrepare_DiskSize(t *testing.T) {
|
|||
}
|
||||
|
||||
testCases := []testcase{
|
||||
testcase{"", "40960M", false}, // not provided
|
||||
testcase{"12345", "12345M", false}, // no unit given, defaults to M
|
||||
testcase{"12345x", "12345x", true}, // invalid unit
|
||||
testcase{"12345T", "12345T", false}, // terabytes
|
||||
testcase{"12345b", "12345b", false}, // bytes get preserved when set.
|
||||
testcase{"60000M", "60000M", false}, // Original test case
|
||||
{"", "40960M", false}, // not provided
|
||||
{"12345", "12345M", false}, // no unit given, defaults to M
|
||||
{"12345x", "12345x", true}, // invalid unit
|
||||
{"12345T", "12345T", false}, // terabytes
|
||||
{"12345b", "12345b", false}, // bytes get preserved when set.
|
||||
{"60000M", "60000M", false}, // Original test case
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
// Set input disk size
|
||||
|
|
|
@ -133,7 +133,7 @@ func (s *stepRunInstance) Run(ctx context.Context, state multistep.StateBag) mul
|
|||
resourceType := "instance"
|
||||
if len(tags) > 0 {
|
||||
req.TagSpecification = []*cvm.TagSpecification{
|
||||
&cvm.TagSpecification{
|
||||
{
|
||||
ResourceType: &resourceType,
|
||||
Tags: tags,
|
||||
},
|
||||
|
|
|
@ -12,7 +12,7 @@ func TestFix_allFixersEnabled(t *testing.T) {
|
|||
t.Fatalf("Fixers length (%d) does not match FixerOrder length (%d)", len(f), len(o))
|
||||
}
|
||||
|
||||
for fixer, _ := range f {
|
||||
for fixer := range f {
|
||||
found := false
|
||||
|
||||
for _, orderedFixer := range o {
|
||||
|
|
|
@ -20,7 +20,7 @@ func TestParser_complete(t *testing.T) {
|
|||
parseTestArgs{"testdata/complete"},
|
||||
&PackerConfig{
|
||||
Sources: map[SourceRef]*Source{
|
||||
refVBIsoUbuntu1204: &Source{Type: "virtualbox-iso", Name: "ubuntu-1204"},
|
||||
refVBIsoUbuntu1204: {Type: "virtualbox-iso", Name: "ubuntu-1204"},
|
||||
},
|
||||
Builds: Builds{
|
||||
&BuildBlock{
|
||||
|
|
|
@ -15,7 +15,7 @@ func TestParse_source(t *testing.T) {
|
|||
parseTestArgs{"testdata/sources/basic.pkr.hcl"},
|
||||
&PackerConfig{
|
||||
Sources: map[SourceRef]*Source{
|
||||
SourceRef{
|
||||
{
|
||||
Type: "virtualbox-iso",
|
||||
Name: "ubuntu-1204",
|
||||
}: {
|
||||
|
@ -57,7 +57,7 @@ func TestParse_source(t *testing.T) {
|
|||
parseTestArgs{"testdata/sources/duplicate.pkr.hcl"},
|
||||
&PackerConfig{
|
||||
Sources: map[SourceRef]*Source{
|
||||
SourceRef{
|
||||
{
|
||||
Type: "virtualbox-iso",
|
||||
Name: "ubuntu-1204",
|
||||
}: {
|
||||
|
|
Loading…
Reference in New Issue