Golint fixed for modules/template
This commit is contained in:
parent
6a28909f40
commit
229ec927b9
4 changed files with 28 additions and 16 deletions
|
@ -74,7 +74,7 @@ func editFile(ctx *context.Context, isNewFile bool) {
|
|||
|
||||
d, _ := ioutil.ReadAll(dataRc)
|
||||
buf = append(buf, d...)
|
||||
if err, content := template.ToUTF8WithErr(buf); err != nil {
|
||||
if content, err := template.ToUTF8WithErr(buf); err != nil {
|
||||
if err != nil {
|
||||
log.Error(4, "ToUTF8WithErr: %v", err)
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
|
|||
} else {
|
||||
// Building code view blocks with line number on server side.
|
||||
var fileContent string
|
||||
if err, content := template.ToUTF8WithErr(buf); err != nil {
|
||||
if content, err := template.ToUTF8WithErr(buf); err != nil {
|
||||
if err != nil {
|
||||
log.Error(4, "ToUTF8WithErr: %s", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue