浏览代码

Edit install route documentation

Erwan ROUSSEL 7 年之前
父节点
当前提交
66adee78b2
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      routes/install.go

+ 6 - 0
routes/install.go

@@ -27,9 +27,11 @@ import (
 )
 
 const (
+  	// INSTALL page template
 	INSTALL = "install"
 )
 
+// checkRunMode check if it is runned or not in production
 func checkRunMode() {
 	if setting.ProdMode {
 		macaron.Env = macaron.PROD
@@ -40,6 +42,7 @@ func checkRunMode() {
 	log.Info("Run Mode: %s", strings.Title(macaron.Env))
 }
 
+// NewServices initializes new services
 func NewServices() {
 	setting.NewServices()
 	mailer.NewContext()
@@ -96,6 +99,7 @@ func GlobalInit() {
 	}
 }
 
+// InstallInit initialize the install
 func InstallInit(c *context.Context) {
 	if setting.InstallLock {
 		c.NotFound()
@@ -112,6 +116,7 @@ func InstallInit(c *context.Context) {
 	c.Data["DbOptions"] = dbOpts
 }
 
+// Install shows install page
 func Install(c *context.Context) {
 	f := form.Install{}
 
@@ -172,6 +177,7 @@ func Install(c *context.Context) {
 	c.Success(INSTALL)
 }
 
+// InstallPost install gitote
 func InstallPost(c *context.Context, f form.Install) {
 	c.Data["CurDbOption"] = f.DbType