Skip to content

Commit

Permalink
MTA-2064: Fix duplicate sources/targets (konveyor#147)
Browse files Browse the repository at this point in the history
fix duplicate sources/targets

Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
eemcmullan authored Jan 24, 2024
1 parent 20af46f commit 9e4cfca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,13 @@ func listOptionsFromLabels(sl []string, label string) {
newSt := strings.TrimPrefix(label, l)

if newSt != label {
newSl = append(newSl, newSt)
newSt = strings.TrimSuffix(newSt, "+")
newSt = strings.TrimSuffix(newSt, "-")

if !slices.Contains(newSl, newSt) {
newSl = append(newSl, newSt)

}
}
}
sort.Strings(newSl)
Expand All @@ -387,8 +393,6 @@ func listOptionsFromLabels(sl []string, label string) {
fmt.Println("available target technologies:")
}
for _, tech := range newSl {
tech = strings.TrimSuffix(tech, "+")
tech = strings.TrimSuffix(tech, "-")
fmt.Println(tech)
}
}
Expand Down

0 comments on commit 9e4cfca

Please sign in to comment.