Skip to content

Commit d01b58c

Browse files
committed
add comments on controller
1 parent e729ea9 commit d01b58c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

controllers/controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func findSimilarNames(names []models.NameType, name string, threshold float32) (
135135
return similarNames, mtf
136136
}
137137

138-
//findNames return []models.NameVar with all similar names and the metaphone code of searched string
138+
//findNames return []models.NameVar with all similar names and the metaphone code of searched string, called on findSimilarNames
139139
func findNames(names []models.NameType, name string, threshold float32) ([]models.NameVar, string) {
140140
var similarNames []models.NameVar
141141

@@ -183,7 +183,7 @@ func orderByLevenshtein(arr []models.NameVar) []string {
183183

184184
}
185185

186-
//removeDuplicates remove duplicates of []string
186+
//removeDuplicates remove duplicates of []string, called on orderByLevenshtein
187187
func removeDuplicates(arr []string) []string {
188188
var cleanArr []string
189189

@@ -196,7 +196,7 @@ func removeDuplicates(arr []string) []string {
196196
return cleanArr
197197
}
198198

199-
//contains verifies if []string already has a specific string
199+
//contains verifies if []string already has a specific string, called on removeDuplicates
200200
func contains(s []string, str string) bool {
201201
for _, v := range s {
202202
if v == str {

0 commit comments

Comments
 (0)