1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Vendoring

This commit is contained in:
Zack Scholl
2017-10-03 14:43:55 -04:00
parent 21047443d6
commit bef20f3366
2172 changed files with 628903 additions and 0 deletions

24
vendor/github.com/gin-contrib/sse/writer.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
package sse
import "io"
type stringWriter interface {
io.Writer
WriteString(string) (int, error)
}
type stringWrapper struct {
io.Writer
}
func (w stringWrapper) WriteString(str string) (int, error) {
return w.Writer.Write([]byte(str))
}
func checkWriter(writer io.Writer) stringWriter {
if w, ok := writer.(stringWriter); ok {
return w
} else {
return stringWrapper{writer}
}
}