mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 15:00:50 +00:00
commit
39b2e07dc8
2
app.go
2
app.go
@ -30,7 +30,7 @@ func (app *App) Run() {
|
||||
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
|
||||
}
|
||||
|
||||
BeeLogger.Info("Runing on %s", addr)
|
||||
BeeLogger.Info("Running on %s", addr)
|
||||
|
||||
var (
|
||||
err error
|
||||
|
@ -155,7 +155,7 @@ func (p *ControllerRegistor) Add(pattern string, c ControllerInterface, mappingM
|
||||
for _, v := range semi {
|
||||
colon := strings.Split(v, ":")
|
||||
if len(colon) != 2 {
|
||||
panic("method mapping fomate is error")
|
||||
panic("method mapping format is invalid")
|
||||
}
|
||||
comma := strings.Split(colon[0], ",")
|
||||
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() {
|
||||
methods[strings.ToLower(m)] = colon[1]
|
||||
} 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 {
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user