File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
package list
2
2
3
3
import (
4
- "sort"
5
4
"strings"
6
5
7
6
"github.com/fatih/color"
@@ -15,9 +14,12 @@ import (
15
14
)
16
15
17
16
func execute (c * cli.Context ) error {
18
- ls := registry .GetNames ()
19
-
20
- sort .Strings (ls )
17
+ var ls []string
18
+ if c .Args ().Len () > 0 {
19
+ ls = registry .ExpandNames (c .Args ().Slice ())
20
+ } else {
21
+ ls = registry .GetNames ()
22
+ }
21
23
22
24
for _ , name := range ls {
23
25
if strings .HasPrefix (name , "AWS::" ) {
Original file line number Diff line number Diff line change @@ -141,17 +141,17 @@ func execute(c *cli.Context) error { //nolint:funlen,gocyclo
141
141
resourceTypes := types .ResolveResourceTypes (
142
142
registry .GetNames (),
143
143
[]types.Collection {
144
- n .Parameters .Includes ,
144
+ registry . ExpandNames ( n .Parameters .Includes ) ,
145
145
parsedConfig .ResourceTypes .GetIncludes (),
146
146
accountConfig .ResourceTypes .GetIncludes (),
147
147
},
148
148
[]types.Collection {
149
- n .Parameters .Excludes ,
149
+ registry . ExpandNames ( n .Parameters .Excludes ) ,
150
150
parsedConfig .ResourceTypes .Excludes ,
151
151
accountConfig .ResourceTypes .Excludes ,
152
152
},
153
153
[]types.Collection {
154
- n .Parameters .Alternatives ,
154
+ registry . ExpandNames ( n .Parameters .Alternatives ) ,
155
155
parsedConfig .ResourceTypes .GetAlternatives (),
156
156
accountConfig .ResourceTypes .GetAlternatives (),
157
157
},
You can’t perform that action at this time.
0 commit comments