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
00abdcd0
authored
2013-10-31 20:02:53 -0700
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #269 from shavac/master
improve StaticDir config file parser.
2 parents
c6167ef1
73a2081a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
config.go
config.go
View file @
00abdcd
...
...
@@ -180,9 +180,16 @@ func ParseConfig() (err error) {
BeegoServerName
=
serverName
}
if
sd
:=
AppConfig
.
String
(
"StaticDir"
);
sd
!=
""
{
sds
:=
strings
.
Split
(
sd
,
","
)
for
k
:=
range
StaticDir
{
delete
(
StaticDir
,
k
)
}
sds
:=
strings
.
Fields
(
sd
)
for
_
,
v
:=
range
sds
{
StaticDir
[
"/"
+
v
]
=
v
if
url2fsmap
:=
strings
.
SplitN
(
v
,
":"
,
2
);
url2fsmap
[
1
]
!=
""
{
StaticDir
[
"/"
+
url2fsmap
[
0
]]
=
url2fsmap
[
1
]
}
else
{
StaticDir
[
"/"
+
url2fsmap
[
0
]]
=
url2fsmap
[
0
]
}
}
}
}
...
...
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