Fix bug:about the MVC package route binding

I found there has some little bug in the controller_method_parser.go
the bug is : if someone use the code like this:
func (cc *HelloWorld) GetInfoXYT()
We can't create the Url that he want.
We lose the T, our's url is: info/x/y
Cause// it doesn't count the last uppercase and the last append is
words = append(words, s[start:end])


Former-commit-id: 9ff6ad4a220aea2730243ba44912d5a6acc66266
This commit is contained in:
BenLampson 2019-09-25 16:11:39 +08:00
parent 3ea2605276
commit 986be58702

View File

@ -51,7 +51,7 @@ func (l *methodLexer) reset(s string) {
}
if end > 0 && len(s) >= end {
words = append(words, s[start:end])
words = append(words, s[start:])
}
}