mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
* Use vfkit command line assembly * Inject ignition file into guest using http over vsock * Ready notification through use of vsock [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
25 lines
395 B
Go
25 lines
395 B
Go
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}
|
|
}
|
|
}
|