[lxc] go fmt our files
This commit is contained in:
parent
9b4a7e935f
commit
5eb1bc9338
|
@ -27,7 +27,7 @@ func (a *Artifact) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Artifact) State(name string) interface{} {
|
func (a *Artifact) State(name string) interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Artifact) Destroy() error {
|
func (a *Artifact) Destroy() error {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package lxc
|
package lxc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
"os"
|
"os"
|
||||||
|
"testing"
|
||||||
|
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/mitchellh/packer/packer"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package lxc
|
package lxc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/mitchellh/packer/packer"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCommunicator_ImplementsCommunicator(t *testing.T) {
|
func TestCommunicator_ImplementsCommunicator(t *testing.T) {
|
||||||
var raw interface{}
|
var raw interface{}
|
||||||
raw = &LxcAttachCommunicator{}
|
raw = &LxcAttachCommunicator{}
|
||||||
if _, ok := raw.(packer.Communicator); !ok {
|
if _, ok := raw.(packer.Communicator); !ok {
|
||||||
t.Fatalf("Communicator should be a communicator")
|
t.Fatalf("Communicator should be a communicator")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"github.com/mitchellh/packer/helper/config"
|
"github.com/mitchellh/packer/helper/config"
|
||||||
"github.com/mitchellh/packer/packer"
|
"github.com/mitchellh/packer/packer"
|
||||||
"github.com/mitchellh/packer/template/interpolate"
|
"github.com/mitchellh/packer/template/interpolate"
|
||||||
"time"
|
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package lxc
|
package lxc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mitchellh/multistep"
|
|
||||||
"fmt"
|
|
||||||
"github.com/mitchellh/packer/packer"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"os/exec"
|
"fmt"
|
||||||
"log"
|
"github.com/mitchellh/multistep"
|
||||||
"strings"
|
"github.com/mitchellh/packer/packer"
|
||||||
"path/filepath"
|
|
||||||
"os"
|
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type stepExport struct{}
|
type stepExport struct{}
|
||||||
|
@ -75,7 +75,6 @@ func (s *stepExport) Run(state multistep.StateBag) multistep.StepAction {
|
||||||
|
|
||||||
func (s *stepExport) Cleanup(state multistep.StateBag) {}
|
func (s *stepExport) Cleanup(state multistep.StateBag) {}
|
||||||
|
|
||||||
|
|
||||||
func (s *stepExport) SudoCommand(args ...string) error {
|
func (s *stepExport) SudoCommand(args ...string) error {
|
||||||
var stdout, stderr bytes.Buffer
|
var stdout, stderr bytes.Buffer
|
||||||
|
|
||||||
|
@ -96,4 +95,4 @@ func (s *stepExport) SudoCommand(args ...string) error {
|
||||||
log.Printf("stderr: %s", stderrString)
|
log.Printf("stderr: %s", stderrString)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// StepProvision provisions the instance within a chroot.
|
// StepProvision provisions the instance within a chroot.
|
||||||
type StepProvision struct {}
|
type StepProvision struct{}
|
||||||
|
|
||||||
func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction {
|
func (s *StepProvision) Run(state multistep.StateBag) multistep.StepAction {
|
||||||
hook := state.Get("hook").(packer.Hook)
|
hook := state.Get("hook").(packer.Hook)
|
||||||
|
|
Loading…
Reference in New Issue