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
db525cba
authored
2013-05-08 22:31:23 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add session test & delete readme
1 parent
d6dd84d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletions
README.md
session/sess_test.go
README.md
View file @
db525cb
## beego
=======
beego is a Go Framework which is inspired from tornado and sinatra.
It is a simply & powerful web framework.
...
...
session/sess_test.go
0 → 100644
View file @
db525cb
package
session
import
(
"testing"
)
func
Test_gob
(
t
*
testing
.
T
)
{
a
:=
make
(
map
[
interface
{}]
interface
{})
a
[
"username"
]
=
"astaxie"
a
[
12
]
=
234
b
,
err
:=
encodeGob
(
a
)
if
err
!=
nil
{
t
.
Error
(
err
)
}
c
,
err
:=
decodeGob
(
b
)
if
err
!=
nil
{
t
.
Error
(
err
)
}
if
len
(
c
)
==
0
{
t
.
Error
(
"decodeGob empty"
)
}
if
c
[
"username"
]
!=
"astaxie"
{
t
.
Error
(
"decode string error"
)
}
if
c
[
12
]
!=
234
{
t
.
Error
(
"decode int error"
)
}
}
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