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
4823a0f1
Commit
4823a0f1
authored
Sep 17, 2015
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the dead code
parent
e665a7dd
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
44 deletions
+5
-44
conv.go
cache/conv.go
+0
-12
db_alias.go
orm/db_alias.go
+1
-1
utils.go
orm/utils.go
+0
-18
sess_redis.go
session/redis/sess_redis.go
+0
-2
templatefunc.go
templatefunc.go
+0
-1
debug.go
utils/debug.go
+4
-10
No files found.
cache/conv.go
View file @
4823a0f1
...
...
@@ -98,15 +98,3 @@ func GetBool(v interface{}) bool {
}
return
false
}
// getByteArray convert interface to byte slice.
func
getByteArray
(
v
interface
{})
[]
byte
{
switch
result
:=
v
.
(
type
)
{
case
[]
byte
:
return
result
case
string
:
return
[]
byte
(
result
)
default
:
return
nil
}
}
orm/db_alias.go
View file @
4823a0f1
...
...
@@ -63,7 +63,7 @@ var (
dbBasers
=
map
[
DriverType
]
dbBaser
{
DRMySQL
:
newdbBaseMysql
(),
DRSqlite
:
newdbBaseSqlite
(),
DROracle
:
newdbBase
Mysql
(),
DROracle
:
newdbBase
Oracle
(),
DRPostgres
:
newdbBasePostgres
(),
DRTiDB
:
newdbBaseTidb
(),
}
...
...
orm/utils.go
View file @
4823a0f1
...
...
@@ -249,30 +249,12 @@ func (a argInt) Get(i int, args ...int) (r int) {
return
}
type
argAny
[]
interface
{}
// get interface by index from interface slice
func
(
a
argAny
)
Get
(
i
int
,
args
...
interface
{})
(
r
interface
{})
{
if
i
>=
0
&&
i
<
len
(
a
)
{
r
=
a
[
i
]
}
if
len
(
args
)
>
0
{
r
=
args
[
0
]
}
return
}
// parse time to string with location
func
timeParse
(
dateString
,
format
string
)
(
time
.
Time
,
error
)
{
tp
,
err
:=
time
.
ParseInLocation
(
format
,
dateString
,
DefaultTimeLoc
)
return
tp
,
err
}
// format time string
func
timeFormat
(
t
time
.
Time
,
format
string
)
string
{
return
t
.
Format
(
format
)
}
// get pointer indirect type
func
indirectType
(
v
reflect
.
Type
)
reflect
.
Type
{
switch
v
.
Kind
()
{
...
...
session/redis/sess_redis.go
View file @
4823a0f1
...
...
@@ -48,8 +48,6 @@ var redispder = &Provider{}
// redis max pool size
var
MaxPoolSize
=
100
var
redisPool
chan
redis
.
Conn
// SessionStore redis session store
type
SessionStore
struct
{
p
*
redis
.
Pool
...
...
templatefunc.go
View file @
4823a0f1
...
...
@@ -518,7 +518,6 @@ const (
complexKind
intKind
floatKind
integerKind
stringKind
uintKind
)
...
...
utils/debug.go
View file @
4823a0f1
...
...
@@ -26,12 +26,6 @@ var (
dunno
=
[]
byte
(
"???"
)
centerDot
=
[]
byte
(
"·"
)
dot
=
[]
byte
(
"."
)
lbr
=
[]
byte
(
"{"
)
lbrn
=
[]
byte
(
"{
\n
"
)
com
=
[]
byte
(
","
)
comn
=
[]
byte
(
",
\n
"
)
rbr
=
[]
byte
(
"}"
)
comnrbr
=
[]
byte
(
",
\n
}"
)
)
type
pointerInfo
struct
{
...
...
@@ -376,8 +370,8 @@ func printKeyValue(buf *bytes.Buffer, val reflect.Value, pointers **pointerInfo,
}
}
// dump pointer value
func
p
rintPointerInfo
(
buf
*
bytes
.
Buffer
,
headlen
int
,
pointers
*
pointerInfo
)
{
//
PrintPointerInfo
dump pointer value
func
P
rintPointerInfo
(
buf
*
bytes
.
Buffer
,
headlen
int
,
pointers
*
pointerInfo
)
{
var
anyused
=
false
var
pointerNum
=
0
...
...
@@ -444,8 +438,8 @@ func printPointerInfo(buf *bytes.Buffer, headlen int, pointers *pointerInfo) {
}
}
// get stack bytes
func
s
tack
(
skip
int
,
indent
string
)
[]
byte
{
//
Stack
get stack bytes
func
S
tack
(
skip
int
,
indent
string
)
[]
byte
{
var
buf
=
new
(
bytes
.
Buffer
)
for
i
:=
skip
;
;
i
++
{
...
...
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