Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
9ff88f0b
Commit
9ff88f0b
authored
Nov 20, 2016
by
cat2neat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix http body may not be closed
parent
27c59a80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
jianliao.go
logs/jianliao.go
+1
-1
slack.go
logs/slack.go
+1
-1
No files found.
logs/jianliao.go
View file @
9ff88f0b
...
...
@@ -56,10 +56,10 @@ func (s *JLWriter) WriteMsg(when time.Time, msg string, level int) error {
if
err
!=
nil
{
return
err
}
defer
resp
.
Body
.
Close
()
if
resp
.
StatusCode
!=
http
.
StatusOK
{
return
fmt
.
Errorf
(
"Post webhook failed %s %d"
,
resp
.
Status
,
resp
.
StatusCode
)
}
resp
.
Body
.
Close
()
return
nil
}
...
...
logs/slack.go
View file @
9ff88f0b
...
...
@@ -44,10 +44,10 @@ func (s *SLACKWriter) WriteMsg(when time.Time, msg string, level int) error {
if
err
!=
nil
{
return
err
}
defer
resp
.
Body
.
Close
()
if
resp
.
StatusCode
!=
http
.
StatusOK
{
return
fmt
.
Errorf
(
"Post webhook failed %s %d"
,
resp
.
Status
,
resp
.
StatusCode
)
}
resp
.
Body
.
Close
()
return
nil
}
...
...
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