Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
e357f684
Commit
e357f684
authored
Jan 27, 2016
by
youngsterxyf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accept @ysqi suggestion
parent
321bcc60
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
beego.go
beego.go
+1
-10
config.go
config.go
+1
-2
No files found.
beego.go
View file @
e357f684
...
@@ -67,15 +67,6 @@ func Run(params ...string) {
...
@@ -67,15 +67,6 @@ func Run(params ...string) {
}
}
func
initBeforeHTTPRun
()
{
func
initBeforeHTTPRun
()
{
// if AppConfigPath is setted or conf/app.conf exist
/*
err := ParseConfig()
if err != nil {
panic(err)
}
*/
var
err
error
//init hooks
//init hooks
AddAPPStartHook
(
registerMime
)
AddAPPStartHook
(
registerMime
)
AddAPPStartHook
(
registerDefaultErrorHandler
)
AddAPPStartHook
(
registerDefaultErrorHandler
)
...
@@ -85,7 +76,7 @@ func initBeforeHTTPRun() {
...
@@ -85,7 +76,7 @@ func initBeforeHTTPRun() {
AddAPPStartHook
(
registerAdmin
)
AddAPPStartHook
(
registerAdmin
)
for
_
,
hk
:=
range
hooks
{
for
_
,
hk
:=
range
hooks
{
if
err
=
hk
();
err
!=
nil
{
if
err
:
=
hk
();
err
!=
nil
{
panic
(
err
)
panic
(
err
)
}
}
}
}
...
...
config.go
View file @
e357f684
...
@@ -20,7 +20,6 @@ import (
...
@@ -20,7 +20,6 @@ import (
"path/filepath"
"path/filepath"
"strings"
"strings"
"fmt"
"fmt"
"errors"
"github.com/astaxie/beego/config"
"github.com/astaxie/beego/config"
"github.com/astaxie/beego/session"
"github.com/astaxie/beego/session"
...
@@ -320,7 +319,7 @@ func LoadAppConfig(configPath string, adapterName string) error {
...
@@ -320,7 +319,7 @@ func LoadAppConfig(configPath string, adapterName string) error {
}
}
if
!
utils
.
FileExists
(
absConfigPath
)
{
if
!
utils
.
FileExists
(
absConfigPath
)
{
return
errors
.
New
(
fmt
.
Sprintf
(
"the target config file: %s don't exist!"
,
configPath
)
)
return
fmt
.
Errorf
(
"the target config file: %s don't exist!"
,
configPath
)
}
}
if
absConfigPath
==
AppConfigPath
{
if
absConfigPath
==
AppConfigPath
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment