fmt
This commit is contained in:
parent
19317fe92d
commit
5c5d62733f
|
@ -17,7 +17,7 @@ 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
|
||||
|
@ -25,7 +25,7 @@ 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"
|
||||
|
@ -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"`
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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(","),
|
||||
),
|
||||
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue