From 3eb075b9fc3cb7bf8aadd094f632d3870f480643 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Wed, 9 Oct 2019 21:18:46 +0200 Subject: [PATCH] Consolidate receiver name --- builder/jdcloud/credential_config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/builder/jdcloud/credential_config.go b/builder/jdcloud/credential_config.go index 75d07309d..e7c12baf8 100644 --- a/builder/jdcloud/credential_config.go +++ b/builder/jdcloud/credential_config.go @@ -67,19 +67,19 @@ func (jd *JDCloudCredentialConfig) ValidateKeyPair() error { return nil } -func (config *JDCloudCredentialConfig) validateRegion() error { +func (jd *JDCloudCredentialConfig) validateRegion() error { regionArray := []string{"cn-north-1", "cn-south-1", "cn-east-1", "cn-east-2"} for _, item := range regionArray { - if item == config.RegionId { + if item == jd.RegionId { return nil } } return fmt.Errorf("[PRE-FLIGHT] Invalid RegionId:%s. "+ - "Legit RegionId are: {cn-north-1, cn-south-1, cn-east-1, cn-east-2}", config.RegionId) + "Legit RegionId are: {cn-north-1, cn-south-1, cn-east-1, cn-east-2}", jd.RegionId) } -func (config *JDCloudCredentialConfig) validateAz() error { - if len(config.Az) == 0 { +func (jd *JDCloudCredentialConfig) validateAz() error { + if len(jd.Az) == 0 { return fmt.Errorf("[PRE-FLIGHT] az info missing") } return nil