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
d5fd5cad
Unverified
Commit
d5fd5cad
authored
Nov 27, 2018
by
astaxie
Committed by
GitHub
Nov 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3417 from xpzouying/update_code_format
better format
parents
42ade6aa
fab7c6b6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
admin.go
admin.go
+1
-2
hooks.go
hooks.go
+1
-1
router.go
router.go
+5
-4
template.go
template.go
+2
-0
No files found.
admin.go
View file @
d5fd5cad
...
...
@@ -20,11 +20,10 @@ import (
"fmt"
"net/http"
"os"
"reflect"
"text/template"
"time"
"reflect"
"github.com/astaxie/beego/grace"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/toolbox"
...
...
hooks.go
View file @
d5fd5cad
...
...
@@ -11,7 +11,7 @@ import (
"github.com/astaxie/beego/session"
)
//
//
register MIME type with content type
func
registerMime
()
error
{
for
k
,
v
:=
range
mimemaps
{
mime
.
AddExtensionType
(
k
,
v
)
...
...
router.go
View file @
d5fd5cad
...
...
@@ -133,14 +133,15 @@ type ControllerRegister struct {
// NewControllerRegister returns a new ControllerRegister.
func
NewControllerRegister
()
*
ControllerRegister
{
cr
:=
&
ControllerRegister
{
return
&
ControllerRegister
{
routers
:
make
(
map
[
string
]
*
Tree
),
policies
:
make
(
map
[
string
]
*
Tree
),
}
cr
.
pool
.
New
=
func
()
interface
{}
{
pool
:
sync
.
Pool
{
New
:
func
()
interface
{}
{
return
beecontext
.
NewContext
()
},
},
}
return
cr
}
// Add controller handler and pattern rules to ControllerRegister.
...
...
template.go
View file @
d5fd5cad
...
...
@@ -361,6 +361,8 @@ type templateFSFunc func() http.FileSystem
func
defaultFSFunc
()
http
.
FileSystem
{
return
FileSystem
{}
}
// SetTemplateFSFunc set default filesystem function
func
SetTemplateFSFunc
(
fnt
templateFSFunc
)
{
beeTemplateFS
=
fnt
}
...
...
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