From 010cdb2057a8f3eb23b5b23368ce6ca9e4f00819 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 14 Oct 2014 15:39:13 -0700 Subject: [PATCH] amazon/common: style --- builder/amazon/common/state.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index 32115b66b..fe6f7ca62 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -30,14 +30,6 @@ type StateChangeConf struct { Target string } -func isTransientNetworkError(err error) bool { - ret := false - if nerr, ok := err.(net.Error); ok && nerr.Temporary() { - ret = true - } - return ret -} - // AMIStateRefreshFunc returns a StateRefreshFunc that is used to watch // an AMI for state changes. func AMIStateRefreshFunc(conn *ec2.EC2, imageId string) StateRefreshFunc { @@ -179,3 +171,11 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) { return } + +func isTransientNetworkError(err error) bool { + if nerr, ok := err.(net.Error); ok && nerr.Temporary() { + return true + } + + return false +}