INNER CODE UNIT · Go
func
lucagrulla/cw · main.go:299
func (l *lsStreamsCmd) Run(ctx *appContext) error {
foundStreams, errorsCh := cloudwatch.LsStreams(&ctx.Client, &l.GroupName, aws.String(""))
for {
select {
case e := <-errorsCh:
if e != nil {
rnf := &types.ResourceNotFoundException{}
if errors.As(e, &rnf) {
fmt.Fprintln(os.Stderr, *rnf.Message)
} else {
fmt.Fprintln(os.Stderr, e.Error())
}
os.Exit(1)
}
case msg, ok := <-foundStreams:
if ok {
fmt.Println(*msg.LogStreamName)
} else {