Constant is not finding
sonishailendra opened this issue · 1 comments
sonishailendra commented
I have following file, but when I run goconst -min-occurrences 1 -output text .
, it does not return anything. As you can see in the code "http://"
string has two occurrence, my expectation is that goconst
will show some error but it does not display anything. Am I doing right?
package main
import "strings"
var url string
func getUrl() {
if strings.HasPrefix(url,"http://"){
url = strings.TrimPrefix(url,"http://")
} //esle do not control
url = strings.TrimPrefix(string(url),"/")
}
jgautheron commented
Hi @sonishailendra my latest commit (cda7ea3) takes this case into account.