diff --git a/fix/fixer_comm_config.go b/fix/fixer_comm_config.go index f4d95f3b7..d3bd44442 100644 --- a/fix/fixer_comm_config.go +++ b/fix/fixer_comm_config.go @@ -45,7 +45,7 @@ func (FixerCommConfig) Fix(input map[string]interface{}) (map[string]interface{} } else if _, ok := builders["ssh_host_port_min"]; ok { // replace ssh_host_port_min with host_port_min - sshHostPortMinRaw, _ := builders["ssh_host_port_min"] + sshHostPortMinRaw := builders["ssh_host_port_min"] delete(builders, "ssh_host_port_min") builders["host_port_min"] = sshHostPortMinRaw } @@ -61,7 +61,7 @@ func (FixerCommConfig) Fix(input map[string]interface{}) (map[string]interface{} } else if _, ok := builders["ssh_host_port_max"]; ok { // replace ssh_host_port_max with host_port_max - sshHostPortMaxRaw, _ := builders["ssh_host_port_max"] + sshHostPortMaxRaw := builders["ssh_host_port_max"] delete(builders, "ssh_host_port_max") builders["host_port_max"] = sshHostPortMaxRaw @@ -78,7 +78,7 @@ func (FixerCommConfig) Fix(input map[string]interface{}) (map[string]interface{} } else if _, ok := builders["ssh_skip_nat_mapping"]; ok { // replace ssh_skip_nat_mapping with skip_nat_mapping - sshSkipNatMappingRaw, _ := builders["ssh_skip_nat_mapping"] + sshSkipNatMappingRaw := builders["ssh_skip_nat_mapping"] sshSkipNatMappingBool, ok := sshSkipNatMappingRaw.(bool) if ok { delete(builders, "ssh_skip_nat_mapping") diff --git a/packer/artifact_mock.go b/packer/artifact_mock.go index 737032447..8f195c571 100644 --- a/packer/artifact_mock.go +++ b/packer/artifact_mock.go @@ -44,7 +44,7 @@ func (a *MockArtifact) String() string { } func (a *MockArtifact) State(name string) interface{} { - value, _ := a.StateValues[name] + value := a.StateValues[name] return value } diff --git a/packer/artifact_test.go b/packer/artifact_test.go index 4ddc5f0ac..2bbb172a6 100644 --- a/packer/artifact_test.go +++ b/packer/artifact_test.go @@ -28,7 +28,7 @@ func (*TestArtifact) String() string { } func (a *TestArtifact) State(name string) interface{} { - value, _ := a.state[name] + value := a.state[name] return value }