Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by 田欧 · committed by GitHub · parent 32b58e0 · Browse files · 2 files+6 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+6 added−2 removed

  • other:+6 added−2 removed

2 files+6 added−2 removed

modified:render/reader.go+4 added
1// Copyright 2018 Gin Core Team. All rights reserved.2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45package render67import (8 "io"
32 unmodified lines
modified:render/text.go+2 added-2 removed
28 unmodified lines
29func WriteString(w http.ResponseWriter, format string, data []interface{}) {30 writeContentType(w, plainContentType)31 if len(data) > 0 {32 fmt.Fprintf(w, format, data...)33 } else {34 io.WriteString(w, format)33 return34 }35 io.WriteString(w, format)36}