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
b91263a2
Commit
b91263a2
authored
Oct 17, 2017
by
hzlinqien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: fix typos
parent
b55e20ac
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
beego.go
beego.go
+1
-1
migration.go
migration/migration.go
+1
-1
models.go
orm/models.go
+1
-1
models_boot.go
orm/models_boot.go
+2
-2
models_fields.go
orm/models_fields.go
+5
-5
sess_file.go
session/sess_file.go
+1
-1
No files found.
beego.go
View file @
b91263a2
...
...
@@ -40,7 +40,7 @@ var (
// AddAPPStartHook is used to register the hookfunc
// The hookfuncs will run in beego.Run()
// such as sessionInit, middle
r
ware start, buildtemplate, admin start
// such as sessionInit, middleware start, buildtemplate, admin start
func
AddAPPStartHook
(
hf
hookfunc
)
{
hooks
=
append
(
hooks
,
hf
)
}
...
...
migration/migration.go
View file @
b91263a2
...
...
@@ -138,7 +138,7 @@ func Register(name string, m Migrationer) error {
return
nil
}
// Upgrade upgra
t
e the migration from lasttime
// Upgrade upgra
d
e the migration from lasttime
func
Upgrade
(
lasttime
int64
)
error
{
sm
:=
sortMap
(
migrationMap
)
i
:=
0
...
...
orm/models.go
View file @
b91263a2
...
...
@@ -52,7 +52,7 @@ func (mc *_modelCache) all() map[string]*modelInfo {
return
m
}
// get orderd model info
// get order
e
d model info
func
(
mc
*
_modelCache
)
allOrdered
()
[]
*
modelInfo
{
m
:=
make
([]
*
modelInfo
,
0
,
len
(
mc
.
orders
))
for
_
,
table
:=
range
mc
.
orders
{
...
...
orm/models_boot.go
View file @
b91263a2
...
...
@@ -89,7 +89,7 @@ func registerModel(PrefixOrSuffix string, model interface{}, isPrefix bool) {
modelCache
.
set
(
table
,
mi
)
}
// boostrap models
// boo
t
strap models
func
bootStrap
()
{
if
modelCache
.
done
{
return
...
...
@@ -332,7 +332,7 @@ func RegisterModelWithSuffix(suffix string, models ...interface{}) {
}
}
// BootStrap bootrap models.
// BootStrap boot
st
rap models.
// make all model parsed and can not add more models
func
BootStrap
()
{
if
modelCache
.
done
{
...
...
orm/models_fields.go
View file @
b91263a2
...
...
@@ -232,7 +232,7 @@ func (e *DateField) Set(d time.Time) {
*
e
=
DateField
(
d
)
}
// String convert dat
a
time to string
// String convert dat
e
time to string
func
(
e
*
DateField
)
String
()
string
{
return
e
.
Value
()
.
String
()
}
...
...
@@ -272,12 +272,12 @@ var _ Fielder = new(DateField)
// Takes the same extra arguments as DateField.
type
DateTimeField
time
.
Time
// Value return the dat
a
time value
// Value return the dat
e
time value
func
(
e
DateTimeField
)
Value
()
time
.
Time
{
return
time
.
Time
(
e
)
}
// Set set the time.Time to dat
a
time
// Set set the time.Time to dat
e
time
func
(
e
*
DateTimeField
)
Set
(
d
time
.
Time
)
{
*
e
=
DateTimeField
(
d
)
}
...
...
@@ -309,12 +309,12 @@ func (e *DateTimeField) SetRaw(value interface{}) error {
return
nil
}
// RawValue return the dat
a
time value
// RawValue return the dat
e
time value
func
(
e
*
DateTimeField
)
RawValue
()
interface
{}
{
return
e
.
Value
()
}
// verify dat
a
time implement fielder
// verify dat
e
time implement fielder
var
_
Fielder
=
new
(
DateTimeField
)
// FloatField A floating-point number represented in go by a float32 value.
...
...
session/sess_file.go
View file @
b91263a2
...
...
@@ -155,7 +155,7 @@ func (fp *FileProvider) SessionRead(sid string) (Store, error) {
}
// SessionExist Check file session exist.
// it check
e
s the file named from sid exist or not.
// it checks the file named from sid exist or not.
func
(
fp
*
FileProvider
)
SessionExist
(
sid
string
)
bool
{
filepder
.
lock
.
Lock
()
defer
filepder
.
lock
.
Unlock
()
...
...
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