Documentation ¶
Index ¶
Constants ¶
View Source
const ( Delimiter = "delimiter" DelimiterHelp = `field delimiter` Strict = "strict" StrictHelp = `strict parsing` Fields = "fields" FieldsHelp = `` /* 687-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JSONWriter ¶
type JSONWriter struct {
// contains filtered or unexported fields
}
func NewJSONWriter ¶
func NewJSONWriter(w io.Writer, format string) *JSONWriter
func (*JSONWriter) WriteRecord ¶
func (recordWriter *JSONWriter) WriteRecord(record warc.Record, fileName string) error
type ListFlags ¶
type ListFlags struct { FileWalkerFlags flag.FileWalkerFlags FilterFlags flag.FilterFlags WarcIteratorFlags flag.WarcIteratorFlags WarcRecordOptionFlags flag.WarcRecordOptionFlags ConcurrencyFlags flag.ConcurrencyFlags }
func (ListFlags) ToListOptions ¶
func (f ListFlags) ToListOptions() (*ListOptions, error)
type ListOptions ¶
type ListOptions struct {
// contains filtered or unexported fields
}
func (*ListOptions) Complete ¶
func (o *ListOptions) Complete(cmd *cobra.Command, args []string) error
Complete completes the options
func (*ListOptions) Validate ¶
func (o *ListOptions) Validate() error
Validate validates the options
type RecordWriter ¶
type RecordWriter struct {
// contains filtered or unexported fields
}
func NewRecordWriter ¶
func NewRecordWriter(w io.Writer, format, separator string) (*RecordWriter, error)
func (*RecordWriter) FormatRecord ¶
func (recordWriter *RecordWriter) FormatRecord(record warc.Record, fileName string) string
FormatRecord writes the configured fields for the record to a string. Size is written with a place holder since it is not available until the next record is read.
func (*RecordWriter) Write ¶
func (recordWriter *RecordWriter) Write(line string, size int64) error
Write takes a string produced by FormatRecord, replaces eventual size place holders with actual values and writes it to stdout.
func (*RecordWriter) WriteRecord ¶
func (recordWriter *RecordWriter) WriteRecord(record warc.Record, fileName string) error
Click to show internal directories.
Click to hide internal directories.