Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a27f5c0d
authored
2014-10-09 09:17:10 -0400
by
Bill Davis
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove dependency of third party lib
1 parent
a06e0f27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
16 deletions
config.go
config.go
View file @
a27f5c0
...
...
@@ -26,7 +26,6 @@ import (
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/session"
"github.com/astaxie/beego/utils"
"github.com/kelseyhightower/envconfig"
)
var
(
...
...
@@ -84,14 +83,9 @@ var (
RouterCaseSensitive
bool
// router case sensitive default is true
)
type
(
beegoAppConfig
struct
{
type
beegoAppConfig
struct
{
innerConfig
config
.
ConfigContainer
}
beegoEnvConfig
struct
{
RunMode
string
}
)
}
func
newAppConfig
(
AppConfigProvider
,
AppConfigPath
string
)
*
beegoAppConfig
{
ac
,
err
:=
config
.
NewConfig
(
AppConfigProvider
,
AppConfigPath
)
...
...
@@ -294,15 +288,10 @@ func init() {
func
ParseConfig
()
(
err
error
)
{
AppConfig
=
newAppConfig
(
AppConfigProvider
,
AppConfigPath
)
var
ec
beegoEnvConfig
err
=
envconfig
.
Process
(
"beego"
,
&
ec
)
if
err
!=
nil
{
return
err
}
envRunMode
:=
os
.
Getenv
(
"BEEGO_RUNMODE"
)
// set the runmode first
if
e
c
.
RunMode
!=
""
{
RunMode
=
e
c
.
RunMode
if
e
nv
RunMode
!=
""
{
RunMode
=
e
nv
RunMode
}
else
if
runmode
:=
AppConfig
.
String
(
"RunMode"
);
runmode
!=
""
{
RunMode
=
runmode
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment