Skip to content

Commit

Permalink
remove previous implementation of layout
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanaReddy0M committed Feb 10, 2023
1 parent db887e8 commit 527d60a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 842 deletions.
19 changes: 0 additions & 19 deletions internal/aws/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@ import (
"github.com/aws/aws-sdk-go/service/ec2"
)

type ByInstanceId []EC2Resp

func (e ByInstanceId) Len() int { return len(e) }
func (e ByInstanceId) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
func (e ByInstanceId) Less(i, j int) bool { return e[i].InstanceId < e[j].InstanceId }

type ByInstanceType []EC2Resp

func (e ByInstanceType) Len() int { return len(e) }
func (e ByInstanceType) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
func (e ByInstanceType) Less(i, j int) bool { return e[i].InstanceType < e[j].InstanceType }

type ByLaunchTime []EC2Resp

func (e ByLaunchTime) Len() int { return len(e) }
func (e ByLaunchTime) Swap(i, j int) { e[i], e[j] = e[j], e[i] }
func (e ByLaunchTime) Less(i, j int) bool {
return e[i].Instance.LaunchTime.Before(*e[j].Instance.LaunchTime)
}

func GetInstances(sess session.Session) ([]EC2Resp, error) {
var ec2Info []EC2Resp
Expand Down
6 changes: 0 additions & 6 deletions internal/aws/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ type BucketResp struct {
Region string
}

type ByBucketName []BucketResp

func (b ByBucketName) Len() int { return len(b) }
func (b ByBucketName) Swap(i, j int) { b[i], b[j] = b[j], b[i] }
func (b ByBucketName) Less(i, j int) bool { return b[i].BucketName < b[j].BucketName }

func ListBuckets(sess session.Session) ([]BucketResp, error) {
var bucketInfo []BucketResp
s3Serv := *s3.New(&sess)
Expand Down
Loading

0 comments on commit 527d60a

Please sign in to comment.