index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
template
/
template.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
Diffstat
(limited to 'modules/template/template.go')
-rw-r--r--
modules/template/template.go
6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/template/template.go b/modules/template/template.go
index 9d63452d..cc670a65 100644
--- a/
modules/template/template.go
+++ b/
modules/template/template.go
@@ -127,11 +127,7 @@ func Sha1(str string) string {
}
func ToUtf8WithErr(content []byte) (error, string) {
- charsetLabel, err := base.DetectEncoding(content)
- if err != nil {
- return err, ""
- }
-
+ charsetLabel := base.DetectEncoding(content)
if charsetLabel == "UTF-8" {
return nil, string(content)
}