Commit 5c5d6273 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

fmt

parent 19317fe9
...@@ -17,7 +17,7 @@ import ( ...@@ -17,7 +17,7 @@ import (
// see https://api.digitalocean.com/images/?client_id=[client_id]&api_key=[api_key] // see https://api.digitalocean.com/images/?client_id=[client_id]&api_key=[api_key]
// name="Ubuntu 12.04.4 x64", id=3101045, // name="Ubuntu 12.04.4 x64", id=3101045,
const DefaultImage = "ubuntu-12-04-x64" const DefaultImage = "ubuntu-12-04-x64"
// see https://api.digitalocean.com/regions/?client_id=[client_id]&api_key=[api_key] // see https://api.digitalocean.com/regions/?client_id=[client_id]&api_key=[api_key]
// name="New York", id=1 // name="New York", id=1
...@@ -25,7 +25,7 @@ const DefaultRegion = "nyc1" ...@@ -25,7 +25,7 @@ const DefaultRegion = "nyc1"
// see https://api.digitalocean.com/sizes/?client_id=[client_id]&api_key=[api_key] // see https://api.digitalocean.com/sizes/?client_id=[client_id]&api_key=[api_key]
// name="512MB", id=66 (the smallest droplet size) // name="512MB", id=66 (the smallest droplet size)
const DefaultSize = "512mb" const DefaultSize = "512mb"
// The unique id for the builder // The unique id for the builder
const BuilderId = "pearkes.digitalocean" const BuilderId = "pearkes.digitalocean"
...@@ -42,9 +42,9 @@ type config struct { ...@@ -42,9 +42,9 @@ type config struct {
SizeID uint `mapstructure:"size_id"` SizeID uint `mapstructure:"size_id"`
ImageID uint `mapstructure:"image_id"` ImageID uint `mapstructure:"image_id"`
Region string `mapstructure:"region"` Region string `mapstructure:"region"`
Size string `mapstructure:"size"` Size string `mapstructure:"size"`
Image string `mapstructure:"image"` Image string `mapstructure:"image"`
PrivateNetworking bool `mapstructure:"private_networking"` PrivateNetworking bool `mapstructure:"private_networking"`
SnapshotName string `mapstructure:"snapshot_name"` SnapshotName string `mapstructure:"snapshot_name"`
......
...@@ -3,8 +3,8 @@ package iso ...@@ -3,8 +3,8 @@ package iso
import ( import (
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common" parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
) )
// This step attaches the ISO to the virtual machine. // This step attaches the ISO to the virtual machine.
......
...@@ -3,8 +3,8 @@ package iso ...@@ -3,8 +3,8 @@ package iso
import ( import (
"fmt" "fmt"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common" parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
"strconv" "strconv"
) )
......
...@@ -3,8 +3,8 @@ package pvm ...@@ -3,8 +3,8 @@ package pvm
import ( import (
"bytes" "bytes"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common" parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
"testing" "testing"
) )
......
...@@ -68,7 +68,7 @@ func DecodeConfig(target interface{}, raws ...interface{}) (*mapstructure.Metada ...@@ -68,7 +68,7 @@ func DecodeConfig(target interface{}, raws ...interface{}) (*mapstructure.Metada
var md mapstructure.Metadata var md mapstructure.Metadata
decoderConfig := &mapstructure.DecoderConfig{ decoderConfig := &mapstructure.DecoderConfig{
DecodeHook: mapstructure.ComposeDecodeHookFunc( DecodeHook: mapstructure.ComposeDecodeHookFunc(
decodeHook, decodeHook,
mapstructure.StringToSliceHookFunc(","), mapstructure.StringToSliceHookFunc(","),
), ),
...@@ -221,7 +221,7 @@ func decodeConfigHook(raws []interface{}) (mapstructure.DecodeHookFunc, error) { ...@@ -221,7 +221,7 @@ func decodeConfigHook(raws []interface{}) (mapstructure.DecodeHookFunc, error) {
// because internally Packer uses MsgPack for RPC and the MsgPack // because internally Packer uses MsgPack for RPC and the MsgPack
// codec turns strings into []uint8 // codec turns strings into []uint8
if f == reflect.Slice { if f == reflect.Slice {
dataVal := reflect.ValueOf(v) dataVal := reflect.ValueOf(v)
dataType := dataVal.Type() dataType := dataVal.Type()
elemKind := dataType.Elem().Kind() elemKind := dataType.Elem().Kind()
if elemKind == reflect.Uint8 { if elemKind == reflect.Uint8 {
......
...@@ -131,8 +131,8 @@ func ParseTemplate(data []byte, vars map[string]string) (t *Template, err error) ...@@ -131,8 +131,8 @@ func ParseTemplate(data []byte, vars map[string]string) (t *Template, err error)
if vCur.LessThan(vReq) { if vCur.LessThan(vReq) {
return nil, fmt.Errorf( return nil, fmt.Errorf(
"Template requires Packer version %s. " + "Template requires Packer version %s. "+
"Running version is %s.", "Running version is %s.",
vReq, vCur) vReq, vCur)
} }
} }
......
...@@ -279,11 +279,11 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) { ...@@ -279,11 +279,11 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) {
}, },
"bFalse": false, "bFalse": false,
"bTrue": true, "bTrue": true,
"bNil": nil, "bNil": nil,
"bStr": []uint8("bar"), "bStr": []uint8("bar"),
"bInt": 1, "bInt": 1,
"bFloat": 4.5, "bFloat": 4.5,
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment