소스 검색

migrate from errors.new -> fmt.Errorf

AjayTripathy 7 년 전
부모
커밋
5652468b35
1개의 변경된 파일과 1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      cloud/awsprovider.go

+ 1 - 2
cloud/awsprovider.go

@@ -293,8 +293,7 @@ func (aws *AWS) NodePricing(key string) (*Node, error) {
 		}
 		terms, termsOk := aws.Pricing[key]
 		if !termsOk {
-			log.Printf("Unable to find any Pricing data for \"%s\"", key)
-			return nil, errors.New("Missing aws.Pricing")
+			return nil, fmt.Errorf("Unable to find any Pricing data for \"%s\"", key)
 		}
 		if aws.isPreemptible(key) {
 			return &Node{