Print instead of Printf with no dynamic first variable.

This commit is contained in:
Matthew Hooker 2017-03-28 18:06:50 -07:00
parent d1b20b3d9c
commit 0149f679de
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
6 changed files with 9 additions and 8 deletions

View File

@ -25,7 +25,7 @@ func (s *StepCreateEncryptedAMICopy) Run(state multistep.StateBag) multistep.Ste
// Encrypt boot not set, so skip step // Encrypt boot not set, so skip step
if !s.EncryptBootVolume { if !s.EncryptBootVolume {
if kmsKeyId != "" { if kmsKeyId != "" {
log.Printf(fmt.Sprintf("Ignoring KMS Key ID: %s, encrypted=false", kmsKeyId)) log.Printf("Ignoring KMS Key ID: %s, encrypted=false", kmsKeyId)
} }
return multistep.ActionContinue return multistep.ActionContinue
} }

View File

@ -2,11 +2,12 @@ package qemu
import ( import (
"fmt" "fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
"log" "log"
"math/rand" "math/rand"
"net" "net"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
) )
// This step configures the VM to enable the VNC server. // This step configures the VM to enable the VNC server.
@ -28,7 +29,7 @@ func (stepConfigureVNC) Run(state multistep.StateBag) multistep.StepAction {
// best. // best.
msg := fmt.Sprintf("Looking for available port between %d and %d on %s", config.VNCPortMin, config.VNCPortMax, config.VNCBindAddress) msg := fmt.Sprintf("Looking for available port between %d and %d on %s", config.VNCPortMin, config.VNCPortMax, config.VNCBindAddress)
ui.Say(msg) ui.Say(msg)
log.Printf(msg) log.Print(msg)
var vncPort uint var vncPort uint
portRange := int(config.VNCPortMax - config.VNCPortMin) portRange := int(config.VNCPortMax - config.VNCPortMin)
for { for {

View File

@ -317,7 +317,7 @@ func (p *Provisioner) retryable(f func() error) error {
// Create an error and log it // Create an error and log it
err = fmt.Errorf("Retryable error: %s", err) err = fmt.Errorf("Retryable error: %s", err)
log.Printf(err.Error()) log.Print(err.Error())
// Check if we timed out, otherwise we retry. It is safe to // Check if we timed out, otherwise we retry. It is safe to
// retry since the only error case above is if the command // retry since the only error case above is if the command

View File

@ -348,7 +348,7 @@ func (p *Provisioner) retryable(f func() error) error {
// Create an error and log it // Create an error and log it
err = fmt.Errorf("Retryable error: %s", err) err = fmt.Errorf("Retryable error: %s", err)
log.Printf(err.Error()) log.Print(err.Error())
// Check if we timed out, otherwise we retry. It is safe to // Check if we timed out, otherwise we retry. It is safe to
// retry since the only error case above is if the command // retry since the only error case above is if the command

View File

@ -217,7 +217,7 @@ func (p *Provisioner) retryable(f func() error) error {
// Create an error and log it // Create an error and log it
err = fmt.Errorf("Retryable error: %s", err) err = fmt.Errorf("Retryable error: %s", err)
log.Printf(err.Error()) log.Print(err.Error())
// Check if we timed out, otherwise we retry. It is safe to // Check if we timed out, otherwise we retry. It is safe to
// retry since the only error case above is if the command // retry since the only error case above is if the command

View File

@ -270,7 +270,7 @@ func (p *Provisioner) retryable(f func() error) error {
// Create an error and log it // Create an error and log it
err = fmt.Errorf("Retryable error: %s", err) err = fmt.Errorf("Retryable error: %s", err)
log.Printf(err.Error()) log.Print(err.Error())
// Check if we timed out, otherwise we retry. It is safe to // Check if we timed out, otherwise we retry. It is safe to
// retry since the only error case above is if the command // retry since the only error case above is if the command