Преглед изворни кода

Merge pull request #24 from kubecost/AjayTripathy-fix-build

migrate from errors.new -> fmt.Errorf
Ajay Tripathy пре 7 година
родитељ
комит
0648890523
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]
 		terms, termsOk := aws.Pricing[key]
 		if !termsOk {
 		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) {
 		if aws.isPreemptible(key) {
 			return &Node{
 			return &Node{