We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb2571a commit c10be0bCopy full SHA for c10be0b
cmd/saw.go
@@ -42,19 +42,23 @@ func runMultiGroup(pattern string, fn func(string)) error {
42
}
43
44
b := blade.NewBlade(&config.Configuration{}, &awsConfig, nil)
45
+ groups := b.GetLogGroups()
46
+ if len(groups) == 0 {
47
+ return fmt.Errorf("no groups found matching pattern: %s", pattern)
48
+ }
49
50
var wg sync.WaitGroup
- for _, group := range b.GetLogGroups() {
- name := group.LogGroupName
- if name == nil || !re.MatchString(*name) {
51
+ for _, g := range groups {
52
+ group := g.LogGroupName
53
+ if group == nil || !re.MatchString(*group) {
54
continue
55
56
57
wg.Add(1)
58
go func(group string) {
59
defer wg.Done()
60
fn(group)
- }(*name)
61
+ }(*group)
62
63
64
wg.Wait()
0 commit comments