Versions in this module Expand all Collapse all v1 v1.0.3 Apr 4, 2026 Changes in this version + type Batch struct + Header Record + LineStart int + Segments []Segment + Trailer Record + type Block struct + func New(name string, opts ...Option) *Block + func (b *Block) Init(_ context.Context) error + func (b *Block) Layout() map[string]RecordLayout + func (b *Block) Name() string + func (b *Block) Parse(_ context.Context, r io.Reader) (*ParseResult, error) + func (b *Block) ParseFile(ctx context.Context, path string) (*ParseResult, error) + func (b *Block) Shutdown(_ context.Context) error + type FieldDef struct + DateFormat string + DecimalPlaces int + Description string + End int + Name string + Start int + Type FieldType + func BoolField(name string, start, end int) FieldDef + func DateField(name string, start, end int, format ...string) FieldDef + func DecimalField(name string, start, end, decimalPlaces int) FieldDef + func Field(name string, start, end int) FieldDef + func NumericField(name string, start, end int) FieldDef + func (f FieldDef) Describe(description string) FieldDef + type FieldType int + const Alpha + const Boolean + const Date + const Decimal + const Numeric + type Format int + const Format240 + const Format400 + type Option func(*blockConfig) + func WithBatchHeader(fields ...FieldDef) Option + func WithBatchTrailer(fields ...FieldDef) Option + func WithDateLocation(loc *time.Location) Option + func WithDetail(fields ...FieldDef) Option + func WithFileHeader(fields ...FieldDef) Option + func WithFileTrailer(fields ...FieldDef) Option + func WithFormat(f Format) Option + func WithHeader(fields ...FieldDef) Option + func WithSegment(code string, fields ...FieldDef) Option + func WithSkipUnknownSegments() Option + func WithTrailer(fields ...FieldDef) Option + type ParseError struct + Line int + Message string + type ParseResult struct + Batches []Batch + Details []Record + FileHeader Record + FileTrailer Record + Format Format + ParseErrors []ParseError + TotalLines int + type Record map[string]any + type RecordLayout struct + Fields []FieldDef + type Segment struct + Code string + Data Record + Line int