From 780cc2d11093e048e41f2d6da9d76f6c6ac4a5e2 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 30 Aug 2016 02:08:38 -0700 Subject: router/repo: code refactoring --- routers/repo/editor.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'routers/repo/editor.go') diff --git a/routers/repo/editor.go b/routers/repo/editor.go index 81f95956a3..465de00214 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -72,8 +72,7 @@ func editFile(ctx *context.Context, isNewFile bool) { } // Only text file are editable online. - _, isTextFile := base.IsTextFile(buf) - if !isTextFile { + if !base.IsTextFile(buf) { ctx.Handle(404, "", nil) return } -- cgit v1.2.3