|
@@ -1,7 +1,6 @@
|
|
|
package modules
|
|
|
|
|
|
import (
|
|
|
- "fmt"
|
|
|
"net/http"
|
|
|
|
|
|
"golang-fave/engine/wrapper"
|
|
@@ -9,23 +8,21 @@ import (
|
|
|
|
|
|
func (this *Modules) RegisterModule_Index() *Module {
|
|
|
return this.newModule(false, "index", "Pages", func(wrap *wrapper.Wrapper) {
|
|
|
- //fmt.Printf("FrontEnd func call\n")
|
|
|
wrap.W.WriteHeader(http.StatusOK)
|
|
|
wrap.W.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
|
|
wrap.W.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
|
- wrap.W.Write([]byte(`FrontEnd func call`))
|
|
|
+ wrap.W.Write([]byte(`INDEX FrontEnd func call (` + wrap.CurrModule + `)`))
|
|
|
}, func(wrap *wrapper.Wrapper) {
|
|
|
- //fmt.Printf("BackEnd func call\n")
|
|
|
wrap.W.WriteHeader(http.StatusOK)
|
|
|
wrap.W.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
|
|
wrap.W.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
|
- wrap.W.Write([]byte(`BackEnd func call`))
|
|
|
+ wrap.W.Write([]byte(`INDEX BackEnd func call (` + wrap.CurrModule + `)`))
|
|
|
})
|
|
|
}
|
|
|
|
|
|
func (this *Modules) RegisterAction_MysqlSetup() *Action {
|
|
|
return this.newAction(false, "mysql", func(wrap *wrapper.Wrapper) {
|
|
|
- fmt.Printf("ActFunc func call\n")
|
|
|
+ wrap.MsgError(`Some error`)
|
|
|
})
|
|
|
}
|
|
|
|