diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-31 16:09:12 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-31 16:09:12 -0600 |
| commit | 311603d0c0b04d451e9fb8e5e8335dca8425e2c4 (patch) | |
| tree | f38db8e10c4b55aef21c96c30fc71278c6e3d5c6 /vendor/github.com/playwright-community/playwright-go/writable_stream.go | |
| parent | ebb003ef2beaeee61104d6b88a342c5c9fa73b51 (diff) | |
Connect to postgresql
Diffstat (limited to 'vendor/github.com/playwright-community/playwright-go/writable_stream.go')
| -rw-r--r-- | vendor/github.com/playwright-community/playwright-go/writable_stream.go | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/vendor/github.com/playwright-community/playwright-go/writable_stream.go b/vendor/github.com/playwright-community/playwright-go/writable_stream.go deleted file mode 100644 index 7f144b4..0000000 --- a/vendor/github.com/playwright-community/playwright-go/writable_stream.go +++ /dev/null @@ -1,44 +0,0 @@ -package playwright - -import ( - "encoding/base64" - "io" - "os" -) - -type writableStream struct { - channelOwner -} - -func (s *writableStream) Copy(file string) error { - f, err := os.OpenFile(file, os.O_RDONLY, 0) - if err != nil { - return err - } - defer f.Close() - - for { - buf := make([]byte, defaultCopyBufSize) - n, err := f.Read(buf) - if err != nil && err != io.EOF { - return err - } - if n == 0 { - break - } - _, err = s.channel.Send("write", map[string]interface{}{ - "binary": base64.StdEncoding.EncodeToString(buf[:n]), - }) - if err != nil { - return err - } - } - _, err = s.channel.Send("close") - return err -} - -func newWritableStream(parent *channelOwner, objectType string, guid string, initializer map[string]interface{}) *writableStream { - stream := &writableStream{} - stream.createChannelOwner(stream, parent, objectType, guid, initializer) - return stream -} |
