Commit 511cbc11 by JustSong

perf: use slice to improve efficiency (#57)

parent 05e460d9
......@@ -210,7 +210,7 @@ func relayHelper(c *gin.Context) error {
select {
case data := <-dataChan:
if strings.HasPrefix(data, "data: [DONE]") {
data = "data: [DONE]"
data = data[:12]
}
c.Render(-1, common.CustomEvent{Data: data})
return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment