Make paste file a ReadWriteSeekCloser
parent
dddd9bbe8e
commit
af658da26b
|
@ -10,12 +10,18 @@ import (
|
|||
|
||||
const pasteFileMode = 0644
|
||||
|
||||
// ReadWriteSeekCloser implements reading, writing, seeking, and closing
|
||||
type ReadWriteSeekCloser interface {
|
||||
io.ReadWriteSeeker
|
||||
io.Closer
|
||||
}
|
||||
|
||||
// Paster holds a single paste from the system
|
||||
// Implements io.ReadWriteCloser
|
||||
type Paster struct {
|
||||
Paste repository.Paste
|
||||
pasteDir string
|
||||
file *os.File
|
||||
file ReadWriteSeekCloser
|
||||
}
|
||||
|
||||
func (p *Paster) getPath() string {
|
||||
|
|
Loading…
Reference in New Issue