Skip to content

Commit

Permalink
Fix instance lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
faizalzakaria committed Dec 21, 2022
1 parent b6bbabf commit 3eb9208
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func main() {

app.Commands = cmds
app.Name = "octo"
app.Version = "1.0.8"
app.Version = "1.0.9"
app.Compiled = time.Now()
app.Authors = []*cli.Author{
&cli.Author{
Expand Down
7 changes: 6 additions & 1 deletion ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ func printStringList(list []string) {
func printInstances(instances []*ec2.Instance) {
fmt.Println("\t------------------")
for idx, inst := range instances {
fmt.Printf("\t%d: %s \033[32m(%s, %s)\033[0m\n", idx, *inst.PrivateIpAddress, *inst.InstanceType, *inst.InstanceLifecycle)
instanceLifecycle := "normal"
if (inst.InstanceLifecycle != nil) {
instanceLifecycle = *inst.InstanceLifecycle
}

fmt.Printf("\t%d: %s \033[32m(%s, %s, %s, %s)\033[0m\n", idx, *inst.PrivateIpAddress, *inst.InstanceId, *inst.InstanceType, *inst.ImageId, instanceLifecycle)
}
fmt.Println("\t------------------\n")
}
Expand Down

0 comments on commit 3eb9208

Please sign in to comment.