go fmt
This commit is contained in:
parent
2efab467a8
commit
15f215d04f
|
@ -16,11 +16,18 @@ import (
|
|||
)
|
||||
|
||||
type config struct {
|
||||
// Access information
|
||||
AccessKey string `mapstructure:"access_key"`
|
||||
AMIName string `mapstructure:"ami_name"`
|
||||
Region string
|
||||
SecretKey string `mapstructure:"secret_key"`
|
||||
SourceAmi string `mapstructure:"source_ami"`
|
||||
|
||||
// Information for the source AMI
|
||||
Region string
|
||||
SourceAmi string `mapstructure:"source_ami"`
|
||||
SSHUsername string `mapstructure:"ssh_username"`
|
||||
SSHKeyPath string `mapstructure:"ssh_private_key_path"`
|
||||
|
||||
// Configuration of the resulting AMI
|
||||
AMIName string `mapstructure:"ami_name"`
|
||||
}
|
||||
|
||||
type Builder struct {
|
||||
|
|
|
@ -34,7 +34,7 @@ func (Command) Run(env packer.Environment, args []string) int {
|
|||
// The component finder for our builds
|
||||
components := &packer.ComponentFinder{
|
||||
Builder: env.Builder,
|
||||
Hook: env.Hook,
|
||||
Hook: env.Hook,
|
||||
}
|
||||
|
||||
// Go through each builder and compile the builds that we care about
|
||||
|
|
|
@ -3,8 +3,8 @@ package ssh
|
|||
import (
|
||||
"bytes"
|
||||
"code.google.com/p/go.crypto/ssh"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"fmt"
|
||||
"github.com/mitchellh/packer/packer"
|
||||
"net"
|
||||
"strings"
|
||||
"testing"
|
||||
|
|
|
@ -29,10 +29,10 @@ type Communicator interface {
|
|||
// ExitStatus is the exit code of the remote process. It is only available
|
||||
// once Wait is called.
|
||||
type RemoteCommand struct {
|
||||
Stdin io.Writer
|
||||
Stdout io.Reader
|
||||
Stderr io.Reader
|
||||
Exited bool
|
||||
Stdin io.Writer
|
||||
Stdout io.Reader
|
||||
Stderr io.Reader
|
||||
Exited bool
|
||||
ExitStatus int
|
||||
}
|
||||
|
||||
|
|
|
@ -43,16 +43,16 @@ type Environment interface {
|
|||
// An implementation of an Environment that represents the Packer core
|
||||
// environment.
|
||||
type coreEnvironment struct {
|
||||
commands []string
|
||||
components ComponentFinder
|
||||
ui Ui
|
||||
commands []string
|
||||
components ComponentFinder
|
||||
ui Ui
|
||||
}
|
||||
|
||||
// This struct configures new environments.
|
||||
type EnvironmentConfig struct {
|
||||
Commands []string
|
||||
Components ComponentFinder
|
||||
Ui Ui
|
||||
Commands []string
|
||||
Components ComponentFinder
|
||||
Ui Ui
|
||||
}
|
||||
|
||||
// DefaultEnvironmentConfig returns a default EnvironmentConfig that can
|
||||
|
|
|
@ -7,10 +7,10 @@ import (
|
|||
|
||||
type TestHook struct {
|
||||
runCalled bool
|
||||
runComm Communicator
|
||||
runData interface{}
|
||||
runName string
|
||||
runUi Ui
|
||||
runComm Communicator
|
||||
runData interface{}
|
||||
runName string
|
||||
runUi Ui
|
||||
}
|
||||
|
||||
func (t *TestHook) Run(name string, ui Ui, comm Communicator, data interface{}) {
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
)
|
||||
|
||||
type cmdHook struct {
|
||||
hook packer.Hook
|
||||
client *client
|
||||
hook packer.Hook
|
||||
client *client
|
||||
}
|
||||
|
||||
func (c *cmdHook) Run(name string, ui packer.Ui, comm packer.Communicator, data interface{}) {
|
||||
|
|
|
@ -28,19 +28,19 @@ type RemoteCommandServer struct {
|
|||
}
|
||||
|
||||
type CommunicatorStartResponse struct {
|
||||
StdinAddress string
|
||||
StdoutAddress string
|
||||
StderrAddress string
|
||||
StdinAddress string
|
||||
StdoutAddress string
|
||||
StderrAddress string
|
||||
RemoteCommandAddress string
|
||||
}
|
||||
|
||||
type CommunicatorDownloadArgs struct {
|
||||
Path string
|
||||
Path string
|
||||
WriterAddress string
|
||||
}
|
||||
|
||||
type CommunicatorUploadArgs struct {
|
||||
Path string
|
||||
Path string
|
||||
ReaderAddress string
|
||||
}
|
||||
|
||||
|
|
|
@ -11,20 +11,20 @@ import (
|
|||
|
||||
type testCommunicator struct {
|
||||
startCalled bool
|
||||
startCmd string
|
||||
startCmd string
|
||||
|
||||
startIn *io.PipeReader
|
||||
startOut *io.PipeWriter
|
||||
startErr *io.PipeWriter
|
||||
startExited *bool
|
||||
startIn *io.PipeReader
|
||||
startOut *io.PipeWriter
|
||||
startErr *io.PipeWriter
|
||||
startExited *bool
|
||||
startExitStatus *int
|
||||
|
||||
uploadCalled bool
|
||||
uploadPath string
|
||||
uploadData string
|
||||
uploadPath string
|
||||
uploadData string
|
||||
|
||||
downloadCalled bool
|
||||
downloadPath string
|
||||
downloadPath string
|
||||
}
|
||||
|
||||
func (t *testCommunicator) Start(cmd string) (*packer.RemoteCommand, error) {
|
||||
|
|
|
@ -18,8 +18,8 @@ type HookServer struct {
|
|||
}
|
||||
|
||||
type HookRunArgs struct {
|
||||
Name string
|
||||
Data interface{}
|
||||
Name string
|
||||
Data interface{}
|
||||
RPCAddress string
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
)
|
||||
|
||||
type testHook struct {
|
||||
runCalled bool
|
||||
runUi packer.Ui
|
||||
runCalled bool
|
||||
runUi packer.Ui
|
||||
}
|
||||
|
||||
func (h *testHook) Run(name string, ui packer.Ui, comm packer.Communicator, data interface{}) {
|
||||
|
|
Loading…
Reference in New Issue