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
73a2081a
authored
2013-11-01 08:23:57 +0800
by
knightmare shava
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
improve StaticDir config file parser.New style is like "css:static/css js:static/js"
1 parent
c6167ef1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
config.go
config.go
View file @
73a2081
...
...
@@ -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