Skip to content

Commit e5bf4dd

Browse files
committed
adjust ec2pricing imports
* remove the importing of un-used Lightsail packages, as [requested by @bwagner](aws#78 (comment)) * move non-standard lib imports to their own stanza, as [requested by @bwagner](aws#78 (comment)) Signed-off-by: Mike Ball <[email protected]>
1 parent 5c2c952 commit e5bf4dd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/ec2pricing/ec2pricing.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ package ec2pricing
22

33
import (
44
"fmt"
5-
"github.com/aws/aws-sdk-go/aws/endpoints"
6-
"github.com/aws/aws-sdk-go/service/lightsail"
7-
"github.com/aws/aws-sdk-go/service/lightsail/lightsailiface"
8-
"go.uber.org/multierr"
95
"math"
106
"sort"
117
"strconv"
128
"strings"
139
"time"
1410

11+
"github.com/aws/aws-sdk-go/aws/endpoints"
12+
"go.uber.org/multierr"
13+
1514
"github.com/aws/aws-sdk-go/aws"
1615
"github.com/aws/aws-sdk-go/aws/session"
1716
"github.com/aws/aws-sdk-go/service/ec2"
@@ -30,7 +29,6 @@ const (
3029
type EC2Pricing struct {
3130
PricingClient pricingiface.PricingAPI
3231
EC2Client ec2iface.EC2API
33-
LightsailClient lightsailiface.LightsailAPI
3432
AWSSession *session.Session
3533
onDemandCache map[string]float64
3634
spotCache map[string]map[string][]spotPricingEntry
@@ -60,7 +58,6 @@ func New(sess *session.Session) *EC2Pricing {
6058
return &EC2Pricing{
6159
PricingClient: pricing.New(sess),
6260
EC2Client: ec2.New(sess),
63-
LightsailClient: lightsail.New(sess),
6461
AWSSession: sess,
6562
lastOnDemandCachedUTC: nil,
6663
lastSpotCachedUTC: nil,

0 commit comments

Comments
 (0)