Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed May 1, 2014
1 parent 19317fe commit 5c5d627
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions builder/digitalocean/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ import (

// see https://api.digitalocean.com/images/?client_id=[client_id]&api_key=[api_key]
// 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]
// name="New York", id=1
const DefaultRegion = "nyc1"

// see https://api.digitalocean.com/sizes/?client_id=[client_id]&api_key=[api_key]
// name="512MB", id=66 (the smallest droplet size)
const DefaultSize = "512mb"
const DefaultSize = "512mb"

// The unique id for the builder
const BuilderId = "pearkes.digitalocean"
Expand All @@ -42,9 +42,9 @@ type config struct {
SizeID uint `mapstructure:"size_id"`
ImageID uint `mapstructure:"image_id"`

Region string `mapstructure:"region"`
Size string `mapstructure:"size"`
Image string `mapstructure:"image"`
Region string `mapstructure:"region"`
Size string `mapstructure:"size"`
Image string `mapstructure:"image"`

PrivateNetworking bool `mapstructure:"private_networking"`
SnapshotName string `mapstructure:"snapshot_name"`
Expand Down
2 changes: 1 addition & 1 deletion builder/parallels/iso/step_attach_iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package iso
import (
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
)

// This step attaches the ISO to the virtual machine.
Expand Down
2 changes: 1 addition & 1 deletion builder/parallels/iso/step_create_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package iso
import (
"fmt"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
"strconv"
)

Expand Down
2 changes: 1 addition & 1 deletion builder/parallels/pvm/step_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pvm
import (
"bytes"
"github.com/mitchellh/multistep"
"github.com/mitchellh/packer/packer"
parallelscommon "github.com/mitchellh/packer/builder/parallels/common"
"github.com/mitchellh/packer/packer"
"testing"
)

Expand Down
4 changes: 2 additions & 2 deletions common/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func DecodeConfig(target interface{}, raws ...interface{}) (*mapstructure.Metada

var md mapstructure.Metadata
decoderConfig := &mapstructure.DecoderConfig{
DecodeHook: mapstructure.ComposeDecodeHookFunc(
DecodeHook: mapstructure.ComposeDecodeHookFunc(
decodeHook,
mapstructure.StringToSliceHookFunc(","),
),
Expand Down Expand Up @@ -221,7 +221,7 @@ func decodeConfigHook(raws []interface{}) (mapstructure.DecodeHookFunc, error) {
// because internally Packer uses MsgPack for RPC and the MsgPack
// codec turns strings into []uint8
if f == reflect.Slice {
dataVal := reflect.ValueOf(v)
dataVal := reflect.ValueOf(v)
dataType := dataVal.Type()
elemKind := dataType.Elem().Kind()
if elemKind == reflect.Uint8 {
Expand Down
4 changes: 2 additions & 2 deletions packer/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func ParseTemplate(data []byte, vars map[string]string) (t *Template, err error)

if vCur.LessThan(vReq) {
return nil, fmt.Errorf(
"Template requires Packer version %s. " +
"Running version is %s.",
"Template requires Packer version %s. "+
"Running version is %s.",
vReq, vCur)
}
}
Expand Down
8 changes: 4 additions & 4 deletions provisioner/chef-solo/provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ func TestProvisionerPrepare_jsonNested(t *testing.T) {
},

"bFalse": false,
"bTrue": true,
"bNil": nil,
"bStr": []uint8("bar"),
"bTrue": true,
"bNil": nil,
"bStr": []uint8("bar"),

"bInt": 1,
"bInt": 1,
"bFloat": 4.5,
}

Expand Down

0 comments on commit 5c5d627

Please sign in to comment.