1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-16 18:20:56 +00:00

Merge pull request #336 from vadimi/master

Fixed some typos
This commit is contained in:
astaxie 2013-12-04 19:36:52 -08:00
commit 39b2e07dc8
2 changed files with 4 additions and 4 deletions

2
app.go
View File

@ -30,7 +30,7 @@ func (app *App) Run() {
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort) addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
} }
BeeLogger.Info("Runing on %s", addr) BeeLogger.Info("Running on %s", addr)
var ( var (
err error err error

View File

@ -155,7 +155,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
for _, v := range semi { for _, v := range semi {
colon := strings.Split(v, ":") colon := strings.Split(v, ":")
if len(colon) != 2 { if len(colon) != 2 {
panic("method mapping fomate is error") panic("method mapping format is invalid")
} }
comma := strings.Split(colon[0], ",") comma := strings.Split(colon[0], ",")
for _, m := range comma { for _, m := range comma {
@ -163,10 +163,10 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
if val := reflectVal.MethodByName(colon[1]); val.IsValid() { if val := reflectVal.MethodByName(colon[1]); val.IsValid() {
methods[strings.ToLower(m)] = colon[1] methods[strings.ToLower(m)] = colon[1]
} else { } else {
panic(colon[1] + " method don't exist in the controller " + t.Name()) panic(colon[1] + " method doesn't exist in the controller " + t.Name())
} }
} else { } else {
panic(v + " is an error method mapping,Don't exist method named " + m) panic(v + " is an invalid method mapping. Method doesn't exist " + m)
} }
} }
} }