Skip to content

Commit

Permalink
Merge pull request #5 Show instances number like an AWS Console
Browse files Browse the repository at this point in the history
Show instances number like an AWS Console
  • Loading branch information
budougumi0617 committed Oct 17, 2018
2 parents 68a81eb + cf8c546 commit 8278e60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/main.go
Expand Up @@ -91,16 +91,18 @@ func main() {
}
w := tabwriter.NewWriter(os.Stdout, 0, 4, 4, ' ', 0)
if printHeaderFlag {
w.Write([]byte(fmt.Sprintf("autoscaling-group-name\tdesired-capacity\tmin-size\tmax-size\tLaunch-configuration-name\n")))
w.Write([]byte(fmt.Sprintf("autoscaling-group-name\tinstances\tdesired\tmin\tmax\tLaunch-configuration-name\n")))
}
// autoscaling group name
// instances
// desired capacity
// min
// max
// launch configuration名
for _, asg := range filterd {
w.Write([]byte(fmt.Sprintf("%s\t%d\t%d\t%d\t%s\n",
w.Write([]byte(fmt.Sprintf("%s\t%d\t%d\t%d\t%d\t%s\n",
aws.StringValue(asg.AutoScalingGroupName),
len(asg.Instances),
aws.Int64Value(asg.DesiredCapacity),
aws.Int64Value(asg.MinSize),
aws.Int64Value(asg.MaxSize),
Expand Down

0 comments on commit 8278e60

Please sign in to comment.