gotosocial/vendor/github.com/dsoprea/go-utility/v2/filesystem/readwriteseekcloser.go
kim 94e87610c4
[chore] add back exif-terminator and use only for jpeg,png,webp (#3161)
* add back exif-terminator and use only for jpeg,png,webp

* fix arguments passed to terminateExif()

* pull in latest exif-terminator

* fix test

* update processed img

---------

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-08-02 12:46:41 +01:00

29 lines
608 B
Go

package rifs
import (
"io"
)
// ReadWriteSeekCloser satisfies `io.ReadWriteSeeker` and `io.Closer`
// interfaces.
type ReadWriteSeekCloser interface {
io.ReadWriteSeeker
io.Closer
}
type readWriteSeekNoopCloser struct {
io.ReadWriteSeeker
}
// ReadWriteSeekNoopCloser wraps a `io.ReadWriteSeeker` with a no-op Close()
// call.
func ReadWriteSeekNoopCloser(rws io.ReadWriteSeeker) ReadWriteSeekCloser {
return readWriteSeekNoopCloser{
ReadWriteSeeker: rws,
}
}
// Close does nothing but allows the RWS to satisfy `io.Closer`.:wq
func (readWriteSeekNoopCloser) Close() (err error) {
return nil
}