remove not used variables

This commit is contained in:
유성덕 2018-01-12 10:15:40 +09:00
parent 26030d750c
commit b909e9d4e6
6 changed files with 5 additions and 8 deletions

View File

@ -44,7 +44,7 @@ func (s *StepCreateServerImage) createServerImage(serverInstanceNo string) (*ncl
memberServerImageList, err := s.Conn.CreateMemberServerImage(reqParams) memberServerImageList, err := s.Conn.CreateMemberServerImage(reqParams)
if err != nil { if err != nil {
return nil, fmt.Errorf("error code: %d , error message: %s", memberServerImageList.ReturnCode, memberServerImageList.ReturnMessage) return nil, err
} }
serverImage := memberServerImageList.MemberServerImageList[0] serverImage := memberServerImageList.MemberServerImageList[0]

View File

@ -55,7 +55,7 @@ func (s *StepCreateServerInstance) createServerInstance(loginKeyName string, zon
serverInstanceList, err := s.Conn.CreateServerInstances(reqParams) serverInstanceList, err := s.Conn.CreateServerInstances(reqParams)
if err != nil { if err != nil {
return "", fmt.Errorf("error code: %d, error message: %s", serverInstanceList.ReturnCode, serverInstanceList.ReturnMessage) return "", err
} }
s.serverInstanceNo = serverInstanceList.ServerInstanceList[0].ServerInstanceNo s.serverInstanceNo = serverInstanceList.ServerInstanceList[0].ServerInstanceNo

View File

@ -63,7 +63,7 @@ func (s *StepDeleteBlockStorageInstance) deleteBlockStorageInstance(serverInstan
return nil return nil
} }
result, err := s.Conn.DeleteBlockStorageInstances(blockStorageInstanceList) _, err := s.Conn.DeleteBlockStorageInstances(blockStorageInstanceList)
if err != nil { if err != nil {
return err return err
} }

View File

@ -28,7 +28,7 @@ func NewStepDeleteLoginKey(conn *ncloud.Conn, ui packer.Ui) *StepDeleteLoginKey
} }
func (s *StepDeleteLoginKey) deleteLoginKey(keyName string) error { func (s *StepDeleteLoginKey) deleteLoginKey(keyName string) error {
resp, err := s.Conn.DeleteLoginKey(keyName) _, err := s.Conn.DeleteLoginKey(keyName)
if err != nil { if err != nil {
return err return err
} }

View File

@ -1,8 +1,6 @@
package ncloud package ncloud
import ( import (
"fmt"
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk" ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
"github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/packer"
"github.com/mitchellh/multistep" "github.com/mitchellh/multistep"

View File

@ -2,7 +2,6 @@ package ncloud
import ( import (
"errors" "errors"
"fmt"
"time" "time"
ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk" ncloud "github.com/NaverCloudPlatform/ncloud-sdk-go/sdk"
@ -33,7 +32,7 @@ func (s *StepTerminateServerInstance) terminateServerInstance(serverInstanceNo s
reqParams := new(ncloud.RequestTerminateServerInstances) reqParams := new(ncloud.RequestTerminateServerInstances)
reqParams.ServerInstanceNoList = []string{serverInstanceNo} reqParams.ServerInstanceNoList = []string{serverInstanceNo}
serverInstanceList, err := s.Conn.TerminateServerInstances(reqParams) _, err := s.Conn.TerminateServerInstances(reqParams)
if err != nil { if err != nil {
return err return err
} }