Skip to content

Commit

Permalink
Fixed a bug in the filtering system
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrolattao committed Mar 24, 2020
1 parent 076ce41 commit 89d8565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ func main() {
tagFound := tagExists(resource.Tags, tagKeyFlag)

// if the resource is tagged and I want untagged resource then skip
if tagFound && !*untaggedFlag {
if tagFound && *untaggedFlag {
continue
}

// if the resource is not tagged and I want tagged resource then skip
if !tagFound && *untaggedFlag {
if !tagFound && !*untaggedFlag {
continue
}

Expand Down
4 changes: 3 additions & 1 deletion tags.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package main

import "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
import (
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
)

// tagExists looks for tagKey between tags
func tagExists(tags []*resourcegroupstaggingapi.Tag, tagKey *string) bool {
Expand Down

0 comments on commit 89d8565

Please sign in to comment.