Skip to content

Commit b6cfff9

Browse files
committed
better naming on ruleType
1 parent fd91314 commit b6cfff9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metaphone/metaphonebr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type ruleType struct {
1212
phoneticRepresentation string
1313
offset int
1414
increment int
15-
isFirst bool
15+
isFirstCharOfInput bool //Skips vowels unless one of them is the first character of the input string
1616
}
1717

1818
const (
@@ -50,7 +50,7 @@ func Pack(s string) string {
5050

5151
//for every rule on rules array
5252
for _, rule := range rules {
53-
if rule.isFirst && (i > 0) {
53+
if rule.isFirstCharOfInput && (i > 0) {
5454
continue
5555
}
5656
if (i + rule.offset) < 0 {

0 commit comments

Comments
 (0)