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
e63d2463
Commit
e63d2463
authored
Dec 15, 2015
by
JessonChan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go test fixed
parent
499e2b59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
staticfile_test.go
staticfile_test.go
+2
-1
No files found.
staticfile_test.go
View file @
e63d2463
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"bytes"
"bytes"
"compress/flate"
"compress/flate"
"compress/gzip"
"compress/gzip"
"compress/zlib"
"io"
"io"
"io/ioutil"
"io/ioutil"
"os"
"os"
...
@@ -43,7 +44,7 @@ func TestOpenStaticFileGzip_1(t *testing.T) {
...
@@ -43,7 +44,7 @@ func TestOpenStaticFileGzip_1(t *testing.T) {
func
TestOpenStaticFileDeflate_1
(
t
*
testing
.
T
)
{
func
TestOpenStaticFileDeflate_1
(
t
*
testing
.
T
)
{
file
,
_
:=
os
.
Open
(
licenseFile
)
file
,
_
:=
os
.
Open
(
licenseFile
)
var
zipBuf
bytes
.
Buffer
var
zipBuf
bytes
.
Buffer
fileWriter
,
_
:=
flate
.
NewWriter
(
&
zipBuf
,
flate
.
BestCompression
)
fileWriter
,
_
:=
zlib
.
NewWriterLevel
(
&
zipBuf
,
flate
.
BestCompression
)
io
.
Copy
(
fileWriter
,
file
)
io
.
Copy
(
fileWriter
,
file
)
fileWriter
.
Close
()
fileWriter
.
Close
()
content
,
_
:=
ioutil
.
ReadAll
(
&
zipBuf
)
content
,
_
:=
ioutil
.
ReadAll
(
&
zipBuf
)
...
...
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