Browse Source

Rename func

Vova Tkach 6 years ago
parent
commit
142aa82d83
3 changed files with 4 additions and 4 deletions
  1. 1 1
      backend.go
  2. 1 1
      frontend.go
  3. 2 2
      main.go

+ 1 - 1
backend.go

@@ -6,7 +6,7 @@ import (
 	utils "golang-fave/engine/wrapper/utils"
 	utils "golang-fave/engine/wrapper/utils"
 )
 )
 
 
-func handleBackEnd(wrapper *wrapper.Wrapper) bool {
+func handlerBackEnd(wrapper *wrapper.Wrapper) bool {
 	// MySQL config page
 	// MySQL config page
 	if !utils.IsMySqlConfigExists(wrapper.DirVHostHome) {
 	if !utils.IsMySqlConfigExists(wrapper.DirVHostHome) {
 		return wrapper.TmplBackEnd(templates.CpMySQL, nil)
 		return wrapper.TmplBackEnd(templates.CpMySQL, nil)

+ 1 - 1
frontend.go

@@ -20,7 +20,7 @@ type TmplData struct {
 	MenuItems       []MenuItem
 	MenuItems       []MenuItem
 }
 }
 
 
-func handleFrontEnd(wrapper *wrapper.Wrapper) bool {
+func handlerFrontEnd(wrapper *wrapper.Wrapper) bool {
 	// Redirect to CP, if MySQL config file is not exists
 	// Redirect to CP, if MySQL config file is not exists
 	if !utils.IsMySqlConfigExists(wrapper.DirVHostHome) {
 	if !utils.IsMySqlConfigExists(wrapper.DirVHostHome) {
 		(*wrapper.W).Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
 		(*wrapper.W).Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")

+ 2 - 2
main.go

@@ -127,9 +127,9 @@ func handler(w http.ResponseWriter, r *http.Request) {
 
 
 			// Pages
 			// Pages
 			if !(wrapper.R.URL.Path == "/cp" || strings.HasPrefix(wrapper.R.URL.Path, "/cp/")) {
 			if !(wrapper.R.URL.Path == "/cp" || strings.HasPrefix(wrapper.R.URL.Path, "/cp/")) {
-				return handleFrontEnd(wrapper)
+				return handlerFrontEnd(wrapper)
 			} else {
 			} else {
-				return handleBackEnd(wrapper)
+				return handlerBackEnd(wrapper)
 			}
 			}
 		})
 		})
 }
 }