False positive on solution: https://exercism.io/mentor/solutions/6356bab9214544fe85b37b0c646c183b?iteration_idx=3
package isogram
import (
"strings"
"unicode"
)
//IsIsogram returns true if string is isogram
func IsIsogram(word string) bool {
wordUpper := strings.ToUpper(word)
for i := 0; i < len(wordUpper); i++ {
if unicode.IsLetter(rune(wordUpper[i])) {
if strings.Count(wordUpper, string(wordUpper[i])) > 1 {
return false
}
}
}
return true
}
Wrong output:
- If you're declaring a variable which can be initialized with its zero value, then
var s string is more idiomatic than an assignment: s := "".
False positive on solution: https://exercism.io/mentor/solutions/6356bab9214544fe85b37b0c646c183b?iteration_idx=3
Wrong output:
var s stringis more idiomatic than an assignment:s := "".