]> source.dussan.org Git - gitea.git/commitdiff
Fix code style
authorUnknwon <joe2010xtmf@163.com>
Sat, 23 Aug 2014 12:30:29 +0000 (20:30 +0800)
committerUnknwon <joe2010xtmf@163.com>
Sat, 23 Aug 2014 12:30:29 +0000 (20:30 +0800)
gogs.go
routers/repo/view.go
templates/.VERSION

diff --git a/gogs.go b/gogs.go
index f20f0a10d0449ee304bac0fb36479e2075c7d16f..1e493b92bca7affabb06956088b5ac6bf8e3c518 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
        "github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.4.7.0816 Alpha"
+const APP_VER = "0.4.7.0823 Alpha"
 
 func init() {
        runtime.GOMAXPROCS(runtime.NumCPU())
index bd1dcb8f99e0aadd9a6150620c15163ed9a3ef1b..108e892b9b172c71a8e38c1ff55e0ce566294886 100644 (file)
@@ -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
index 48fe58b179c6f584b1da7572aa8c49f6ded2a2b5..f152becda31fde36514aeed73dca772b54efefbf 100644 (file)
@@ -1 +1 @@
-0.4.7.0816 Alpha
\ No newline at end of file
+0.4.7.0823 Alpha
\ No newline at end of file