summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-23 20:30:29 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-23 20:30:29 +0800
commitb765229a6d2e086872443e333823156a3884d9b1 (patch)
treea7bda6441ae24ebd5082a46c63cc527c02b98518 /routers
parente0a2d23baf5b51041a19773909d1cb2aa209eac6 (diff)
downloadgitea-b765229a6d2e086872443e333823156a3884d9b1.tar.gz
gitea-b765229a6d2e086872443e333823156a3884d9b1.zip
Fix code style
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/view.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index bd1dcb8f99..108e892b9b 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -6,7 +6,6 @@ package repo
import (
"bytes"
- "fmt"
"io/ioutil"
"path"
"path/filepath"
@@ -14,6 +13,7 @@ import (
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/git"
+ "github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
"code.google.com/p/mahonia"
@@ -118,7 +118,9 @@ func Home(ctx *middleware.Context) {
ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, ""))
} else {
if err, content := toUtf8(buf); err != nil {
- fmt.Println("transfer encode error:", err)
+ if err != nil {
+ log.Error(4, "Convert content encoding: %s", err)
+ }
ctx.Data["FileContent"] = string(buf)
} else {
ctx.Data["FileContent"] = content