revel.OnAppStart中的函数怎么没执行?

type AuthHandler interface {
    Authenticate(username, password string) (string, bool)
}

type AuthHandlerFunc func(string, string) (string, bool)

func (f AuthHandlerFunc) Authenticate(u, p string) (string, bool) {
    return f(u, p)
}

func Init(authHandler interface{}) {
    //......
}

    revel.OnAppStart(func() {
        fmt.Println("ddddddxh")
        jwt.Init(jwt.AuthHandlerFunc(func(username, password string) (string, bool) {
fmt.Printf("Username: %v, Password: %v", username, password) //此处未执行,为什么?
//...
}

共 0 个回复