From 35aaf44fa502b7aa71d93a53abad13fd08f1c106 Mon Sep 17 00:00:00 2001 From: Ladar Levison Date: Thu, 27 Dec 2018 02:55:14 -0600 Subject: [PATCH] A properly formatted hyperv ssh.go file. --- builder/hyperv/common/ssh.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/builder/hyperv/common/ssh.go b/builder/hyperv/common/ssh.go index 07141aab9..95d4eeaf8 100644 --- a/builder/hyperv/common/ssh.go +++ b/builder/hyperv/common/ssh.go @@ -1,32 +1,32 @@ package common import ( - "log" + "log" "github.com/hashicorp/packer/helper/multistep" ) func CommHost(host string) func(multistep.StateBag) (string, error) { - return func(state multistep.StateBag) (string, error) { + return func(state multistep.StateBag) (string, error) { - if host != "" { - log.Println("Using ssh_host value: %s", ipAddress) - return host, nil - } + if host != "" { + log.Println("Using ssh_host value: %s", ipAddress) + return host, nil + } - vmName := state.Get("vmName").(string) - driver := state.Get("driver").(Driver) + vmName := state.Get("vmName").(string) + driver := state.Get("driver").(Driver) - mac, err := driver.Mac(vmName) - if err != nil { - return "", err - } + mac, err := driver.Mac(vmName) + if err != nil { + return "", err + } - ip, err := driver.IpAddress(mac) - if err != nil { - return "", err - } + ip, err := driver.IpAddress(mac) + if err != nil { + return "", err + } - return ip, nil - } + return ip, nil + } }