mirror of https://github.com/gin-gonic/gin.git
chore: add missing copyright and update if/else (#1497)
This commit is contained in:
parent
32b58e0fd2
commit
b7bb9baa64
|
@ -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 (
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue