Inside of getService we return an error if the length of services is 0
if len(list.ServiceArns) > 0 {
var serviceNames []string
for _, c := range list.ServiceArns {
arnSplit := strings.Split(*c, "/")
name := arnSplit[len(arnSplit)-1]
serviceNames = append(serviceNames, name)
}
selection, err := selectService(serviceNames)
if err != nil {
e.err <- err
return
}
if selection == backOpt {
e.cmd <- "getCluster"
return
}
e.service = selection
e.cmd <- "getTask"
return
} else {
e.err <- err
return
}
We should allow for scenarios where the cluster has no services, and has tasks run ad-hoc via external orchestrators (such as Jenkins) or scheduled tasks.
Inside of
getService
we return an error if the length of services is 0We should allow for scenarios where the cluster has no services, and has tasks run ad-hoc via external orchestrators (such as Jenkins) or scheduled tasks.