chore: add missing copyright and update if/else (#1497)
This commit is contained in:
		@ -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 (
 | 
				
			||||||
 | 
				
			|||||||
@ -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)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user