Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileReader ¶
type FileReader struct {
Filename string
// contains filtered or unexported fields
}
FileReader creates a ReadCloser from a filename. If postpones error handling up until the first read. TODO(miku): Throw this out.
type LinkReader ¶
type LinkReader struct {
Link string
// contains filtered or unexported fields
}
LinkReader implements io.Reader for a URL.
type SavedLink ¶
type SavedLink struct {
Link string
// contains filtered or unexported fields
}
SavedLink saves the content of a URL to a file.
type SkipReader ¶
type SkipReader struct {
CommentPrefixes []string
// contains filtered or unexported fields
}
SkipReader skips empty lines and lines with comments.
func NewSkipReader ¶
func NewSkipReader(r *bufio.Reader) *SkipReader
NewSkipReader creates a new SkipReader.
func (SkipReader) ReadString ¶
func (r SkipReader) ReadString(delim byte) (s string, err error)
ReadString will return only non-empty lines and lines not starting with a comment prefix.
type WriteCounter ¶
type WriteCounter struct {
// contains filtered or unexported fields
}
WriteCounter counts the number of bytes written through it.
func (*WriteCounter) Count ¶
func (w *WriteCounter) Count() uint64
Count returns the number of bytes written.
type ZipContentReader ¶
type ZipContentReader struct {
Filename string
// contains filtered or unexported fields
}
ZipContentReader returns the concatenated content of all files in a zip archive given by its filename. All content is temporarily stored in memory, so this type should only be used with smaller archives.
type ZipOrPlainLinkReader ¶
type ZipOrPlainLinkReader struct {
Link string
// contains filtered or unexported fields
}
ZipOrPlainLinkReader is a reader that transparently handles zipped and uncompressed content, given a URL as string.