formatting verb fixes for go 1.11

This commit is contained in:
Matthew Hooker 2018-08-24 16:18:21 -07:00
parent 132876b3ac
commit 3f1a9766f4
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
3 changed files with 3 additions and 5 deletions

View File

@ -472,7 +472,7 @@ func assertTagProperties(c *Config, errs *packer.MultiError) {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("the tag name %q exceeds (%d) the 512 character limit", k, len(k))) errs = packer.MultiErrorAppend(errs, fmt.Errorf("the tag name %q exceeds (%d) the 512 character limit", k, len(k)))
} }
if len(*v) > 256 { if len(*v) > 256 {
errs = packer.MultiErrorAppend(errs, fmt.Errorf("the tag name %q exceeds (%d) the 256 character limit", v, len(*v))) errs = packer.MultiErrorAppend(errs, fmt.Errorf("the tag name %q exceeds (%d) the 256 character limit", *v, len(*v)))
} }
} }
} }

View File

@ -586,12 +586,12 @@ func TestConfigShouldAcceptTags(t *testing.T) {
value := c.AzureTags["tag01"] value := c.AzureTags["tag01"]
if *value != "value01" { if *value != "value01" {
t.Errorf("expected AzureTags[\"tag01\"] to have value \"value01\", but got %q", value) t.Errorf("expected AzureTags[\"tag01\"] to have value \"value01\", but got %q", *value)
} }
value = c.AzureTags["tag02"] value = c.AzureTags["tag02"]
if *value != "value02" { if *value != "value02" {
t.Errorf("expected AzureTags[\"tag02\"] to have value \"value02\", but got %q", value) t.Errorf("expected AzureTags[\"tag02\"] to have value \"value02\", but got %q", *value)
} }
} }

View File

@ -124,7 +124,6 @@ func Test_flushes(t *testing.T) {
} }
func Test_KeyIntervalNotGiven(t *testing.T) { func Test_KeyIntervalNotGiven(t *testing.T) {
var codes []string
sendCodes := func(c []string) error { sendCodes := func(c []string) error {
codes = c codes = c
return nil return nil
@ -134,7 +133,6 @@ func Test_KeyIntervalNotGiven(t *testing.T) {
} }
func Test_KeyIntervalGiven(t *testing.T) { func Test_KeyIntervalGiven(t *testing.T) {
var codes []string
sendCodes := func(c []string) error { sendCodes := func(c []string) error {
codes = c codes = c
return nil return nil