Make paste file a ReadWriteSeekCloser

master
Nick Krichevsky 2019-03-09 22:30:33 -05:00
parent dddd9bbe8e
commit af658da26b
1 changed files with 7 additions and 1 deletions

View File

@ -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 {