github.phpd.cn/hashicorp/packer@v1.3.2/builder/virtualbox/common/ssh.go (about) 1 package common 2 3 import ( 4 "github.com/hashicorp/packer/helper/multistep" 5 ) 6 7 func CommHost(host string) func(multistep.StateBag) (string, error) { 8 return func(state multistep.StateBag) (string, error) { 9 return host, nil 10 } 11 } 12 13 func SSHPort(state multistep.StateBag) (int, error) { 14 sshHostPort := state.Get("sshHostPort").(int) 15 return sshHostPort, nil 16 }