Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
util
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘旋尧
util
Commits
f652079c
Commit
f652079c
authored
Jul 30, 2016
by
usual2970
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
静态资源钩子调整
parent
cf5c0880
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
git.go
service/controllers/git.go
+10
-2
No files found.
service/controllers/git.go
View file @
f652079c
...
...
@@ -44,12 +44,16 @@ func (c *GitController) Hook() {
if
len
(
upList
)
>
0
{
for
_
,
v
:=
range
upList
{
fd
,
_
:=
os
.
Open
(
repoPath
+
v
[
1
])
fd
,
err
:=
os
.
Open
(
repoPath
+
v
[
1
])
if
err
!=
nil
{
continue
}
_
,
err
:=
up
.
Put
(
"/"
+
v
[
1
],
fd
,
false
,
nil
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
fmt
.
Println
(
v
[
1
])
fd
.
Close
()
}
}
...
...
@@ -58,9 +62,13 @@ func (c *GitController) Hook() {
if
len
(
crList
)
>
0
{
for
_
,
cr
:=
range
crList
{
fd
,
_
:=
os
.
Open
(
repoPath
+
cr
[
1
])
fd
,
err
:=
os
.
Open
(
repoPath
+
cr
[
1
])
if
err
!=
nil
{
continue
}
up
.
Put
(
"/"
+
cr
[
1
],
fd
,
false
,
nil
)
fmt
.
Println
(
cr
[
1
])
fd
.
Close
()
}
}
...
...
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