chore: add missing copyright and update if/else

This commit is contained in:
thinkerou 2018-08-19 18:11:11 +08:00
parent 6073a79ee0
commit d452233ace
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
// Copyright 2018 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package render package render
import ( import (

View File

@ -30,7 +30,7 @@ func WriteString(w http.ResponseWriter, format string, data []interface{}) {
writeContentType(w, plainContentType) writeContentType(w, plainContentType)
if len(data) > 0 { if len(data) > 0 {
fmt.Fprintf(w, format, data...) fmt.Fprintf(w, format, data...)
} else { return
}
io.WriteString(w, format) io.WriteString(w, format)
} }
}