Skip to content
Myr

chore: improve render string performance (#2365)

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

authored by Bo-Yi Wu · committed by GitHub · parent 82b284f · Browse files · 1 file+1 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

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:render/text.go+1 added-2 removed
4 unmodified lines
5package render67import (8 "fmt"9 "io"9 "net/http"10)1112// String contains the given interface object slice and its format.
20 unmodified lines
33 if len(data) > 0 {34 _, err = fmt.Fprintf(w, format, data...)35 return36 }38 _, err = io.WriteString(w, format)37 _, err = w.Write([]byte(format))38 return39}