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
a2a6f47a
authored
2014-05-25 22:37:38 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
beego: support other config provider
1 parent
23229ef9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
config.go
config.go
View file @
a2a6f47
...
...
@@ -70,6 +70,7 @@ var (
AdminHttpPort
int
FlashName
string
// name of the flash variable found in response header and cookie
FlashSeperator
string
// used to seperate flash key:value
AppConfigProvider
string
// config provider
)
func
init
()
{
...
...
@@ -91,6 +92,8 @@ func init() {
}
}
AppConfigProvider
=
"ini"
StaticDir
=
make
(
map
[
string
]
string
)
StaticDir
[
"/static"
]
=
"static"
...
...
@@ -170,7 +173,7 @@ func init() {
// ParseConfig parsed default config file.
// now only support ini, next will support json.
func
ParseConfig
()
(
err
error
)
{
AppConfig
,
err
=
config
.
NewConfig
(
"ini"
,
AppConfigPath
)
AppConfig
,
err
=
config
.
NewConfig
(
AppConfigProvider
,
AppConfigPath
)
if
err
!=
nil
{
AppConfig
=
config
.
NewFakeConfig
()
return
err
...
...
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