chore: add missing copyright and update if/else (#1497)

This commit is contained in:
田欧 2018-08-19 22:52:43 +08:00 committed by GitHub
parent 32b58e0fd2
commit b7bb9baa64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
import (

View File

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