mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-29 23:06:19 +01:00
Fix code style
This commit is contained in:
parent
e0a2d23baf
commit
b765229a6d
2
gogs.go
2
gogs.go
@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.4.7.0816 Alpha"
|
const APP_VER = "0.4.7.0823 Alpha"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
@ -6,7 +6,6 @@ package repo
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -14,6 +13,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gogits/gogs/modules/base"
|
"github.com/gogits/gogs/modules/base"
|
||||||
"github.com/gogits/gogs/modules/git"
|
"github.com/gogits/gogs/modules/git"
|
||||||
|
"github.com/gogits/gogs/modules/log"
|
||||||
"github.com/gogits/gogs/modules/middleware"
|
"github.com/gogits/gogs/modules/middleware"
|
||||||
|
|
||||||
"code.google.com/p/mahonia"
|
"code.google.com/p/mahonia"
|
||||||
@ -118,7 +118,9 @@ func Home(ctx *middleware.Context) {
|
|||||||
ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, ""))
|
ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, ""))
|
||||||
} else {
|
} else {
|
||||||
if err, content := toUtf8(buf); err != nil {
|
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)
|
ctx.Data["FileContent"] = string(buf)
|
||||||
} else {
|
} else {
|
||||||
ctx.Data["FileContent"] = content
|
ctx.Data["FileContent"] = content
|
||||||
|
@ -1 +1 @@
|
|||||||
0.4.7.0816 Alpha
|
0.4.7.0823 Alpha
|
Loading…
Reference in New Issue
Block a user