Skip to content

Commit

Permalink
Convert CurrentGeneration to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
cristim committed Sep 5, 2023
1 parent cc2816f commit 7e56245
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions rds_instance_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import (
type RDSInstanceData []RDSInstance

type RDSInstance struct {
Arch string `json:"arch,omitempty"`
ClockSpeed string `json:"clockSpeed,omitempty"`
CurrentGeneration string `json:"currentGeneration,omitempty"`
Arch string `json:"arch,omitempty"`
ClockSpeed string `json:"clockSpeed,omitempty"`
CurrentGenerationRaw string `json:"currentGeneration,omitempty"`
CurrentGeneration bool
DedicatedEbsThroughput string `json:"dedicatedEbsThroughput,omitempty"`
EbsBaselineBandwidth float64 `json:"ebs_baseline_bandwidth,omitempty"`
EbsBaselineIops float64 `json:"ebs_baseline_iops,omitempty"`
Expand Down Expand Up @@ -109,5 +110,11 @@ func RDSData() (*RDSInstanceData, error) {

// Similar to the EC2 instance data code, you can perform sorting and other operations here.

for _, data := range d {
if data.CurrentGenerationRaw == "Yes" {
data.CurrentGeneration = true
}
}

return &d, nil
}

0 comments on commit 7e56245

Please sign in to comment.