Skip to content

Commit

Permalink
update condition checks
Browse files Browse the repository at this point in the history
Co-authored-by: Dario Castañé <[email protected]>
  • Loading branch information
juliannzhou and darccio authored Jun 4, 2024
1 parent f246bb5 commit eb1e1f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/datastreams/pathway.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ import (
var hashableEdgeTags = map[string]struct{}{"event_type": {}, "exchange": {}, "group": {}, "topic": {}, "type": {}, "direction": {}}

func isValidArn(arn string) bool {
parts := strings.Split(arn, ":")
if len(parts) > 0 && parts[0] == "arn" && len(parts) > 5 {
separators := strings.Count(arn, ":")
if separators < 5 {
return false
}
if strings.HasPrefix(arn, "arn:") {
return true
}
return false
Expand Down

0 comments on commit eb1e1f5

Please sign in to comment.