@@ -29,6 +29,10 @@ func match(line, searchArgs string) bool {
29
29
return strings .Contains (strings .ToLower (line ), strings .ToLower (searchArgs ))
30
30
}
31
31
32
+ func exactMatch (line , searchArgs string ) bool {
33
+ return strings .Compare (strings .ToLower (line ), strings .ToLower (searchArgs )) == 0
34
+ }
35
+
32
36
// PlatformSearch FIXMEDOC
33
37
func PlatformSearch (instanceID int32 , searchArgs string , allVersions bool ) (* rpc.PlatformSearchResp , error ) {
34
38
pm := commands .GetPackageManager (instanceID )
@@ -55,7 +59,7 @@ func PlatformSearch(instanceID int32, searchArgs string, allVersions bool) (*rpc
55
59
}
56
60
57
61
// platform has a valid release, check if it matches the search arguments
58
- if match (platform .Name , searchArgs ) || match (platform .Architecture , searchArgs ) {
62
+ if match (platform .Name , searchArgs ) || match (platform .Architecture , searchArgs ) || exactMatch ( platform . String (), searchArgs ) {
59
63
if allVersions {
60
64
res = append (res , platform .GetAllReleases ()... )
61
65
} else {
0 commit comments