summaryrefslogtreecommitdiffstats
path: root/modules/template
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-13 19:56:33 -0500
committerUnknwon <u@gogs.io>2015-12-13 19:56:33 -0500
commit95f9c85bcc8f915d823f57cd5923302dfc156504 (patch)
treef6e74391810f4105f8b9712796df7f030b45095a /modules/template
parent79dcd7ee6e0c3bb576cf5d0ece583156c4466b95 (diff)
downloadgitea-95f9c85bcc8f915d823f57cd5923302dfc156504.tar.gz
gitea-95f9c85bcc8f915d823f57cd5923302dfc156504.zip
#2185 use Go sub-repo to detect encoding
Diffstat (limited to 'modules/template')
-rw-r--r--modules/template/template.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/template/template.go b/modules/template/template.go
index 9d63452dd3..cc670a651f 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)
}