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
28011a58
Commit
28011a58
authored
Feb 26, 2017
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #2462
parent
9266ece7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
config.go
config.go
+3
-4
No files found.
config.go
View file @
28011a58
...
...
@@ -254,6 +254,9 @@ func parseConfig(appConfigPath string) (err error) {
}
func
assignConfig
(
ac
config
.
Configer
)
error
{
for
_
,
i
:=
range
[]
interface
{}{
&
BConfig
.
Listen
,
&
BConfig
.
WebConfig
,
&
BConfig
.
Log
,
&
BConfig
.
WebConfig
.
Session
}
{
assignSingleConfig
(
i
,
ac
)
}
// set the run mode first
if
envRunMode
:=
os
.
Getenv
(
"BEEGO_RUNMODE"
);
envRunMode
!=
""
{
BConfig
.
RunMode
=
envRunMode
...
...
@@ -261,10 +264,6 @@ func assignConfig(ac config.Configer) error {
BConfig
.
RunMode
=
runMode
}
for
_
,
i
:=
range
[]
interface
{}{
BConfig
,
&
BConfig
.
Listen
,
&
BConfig
.
WebConfig
,
&
BConfig
.
Log
,
&
BConfig
.
WebConfig
.
Session
}
{
assignSingleConfig
(
i
,
ac
)
}
if
sd
:=
ac
.
String
(
"StaticDir"
);
sd
!=
""
{
BConfig
.
WebConfig
.
StaticDir
=
map
[
string
]
string
{}
sds
:=
strings
.
Fields
(
sd
)
...
...
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