diff options
author | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-05 09:05:40 -0400 |
commit | 6fbb984ebf4f0d6804f0f83e6edb12ef0bb9a570 (patch) | |
tree | 81f08210cb3553370795ec11c731d37bb3590122 /routers/repo/editor.go | |
parent | ba151eda0a8b6eec2cb45f01fcbc8aef7ad5a06f (diff) |
Refactoring: rename pkg/base -> pkg/tool
Diffstat (limited to 'routers/repo/editor.go')
-rw-r--r-- | routers/repo/editor.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 9bbee51c..710e70df 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -15,7 +15,7 @@ import ( "github.com/gogits/git-module" "github.com/gogits/gogs/models" - "github.com/gogits/gogs/pkg/base" + "github.com/gogits/gogs/pkg/tool" "github.com/gogits/gogs/pkg/context" "github.com/gogits/gogs/pkg/form" "github.com/gogits/gogs/pkg/setting" @@ -23,10 +23,10 @@ import ( ) const ( - EDIT_FILE base.TplName = "repo/editor/edit" - EDIT_DIFF_PREVIEW base.TplName = "repo/editor/diff_preview" - DELETE_FILE base.TplName = "repo/editor/delete" - UPLOAD_FILE base.TplName = "repo/editor/upload" + EDIT_FILE tool.TplName = "repo/editor/edit" + EDIT_DIFF_PREVIEW tool.TplName = "repo/editor/diff_preview" + DELETE_FILE tool.TplName = "repo/editor/delete" + UPLOAD_FILE tool.TplName = "repo/editor/upload" ) // getParentTreeFields returns list of parent tree names and corresponding tree paths @@ -80,7 +80,7 @@ func editFile(ctx *context.Context, isNewFile bool) { buf = buf[:n] // Only text file are editable online. - if !base.IsTextFile(buf) { + if !tool.IsTextFile(buf) { ctx.Handle(404, "", nil) return } |