Documentation ¶
Overview ¶
Package fixedlen is a Go library to read and write Fixed-Length format.
Index ¶
- Constants
- type Delimiter
- type DelimiterPositions
- type Field
- type Measure
- type PositionStatus
- type Reader
- type RecordSpaces
- type Space
- type TableSpaces
- func (t TableSpaces) CountColumnStatus(pos int) (inValue int, endOfValue int, inSpace int, endOfSpace int, endOfLine int, ...)
- func (t TableSpaces) InHeaderValue(pos int) bool
- func (t TableSpaces) NextSpaceEnd(pos int) int
- func (t TableSpaces) PrevSpaceStart(pos int) int
- func (t TableSpaces) TableLen() int
- type Writer
Constants ¶
View Source
const OutOfLine = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Delimiter ¶
type Delimiter struct { NoHeader bool Encoding text.Encoding // contains filtered or unexported fields }
type DelimiterPositions ¶
type DelimiterPositions []int
func (DelimiterPositions) Equal ¶
func (p DelimiterPositions) Equal(p2 DelimiterPositions) bool
func (DelimiterPositions) Last ¶
func (p DelimiterPositions) Last() int
func (DelimiterPositions) String ¶
func (p DelimiterPositions) String() string
type Measure ¶
type Measure struct { Encoding text.Encoding // contains filtered or unexported fields }
func NewMeasure ¶
func NewMeasure() *Measure
func (*Measure) GeneratePositions ¶
func (m *Measure) GeneratePositions() DelimiterPositions
type PositionStatus ¶
type PositionStatus int
const ( PositionOut PositionStatus = iota PositionInValue PositionEndOfValue PositionInSpace PositionEndOfSpace )
type Reader ¶
type Reader struct { DelimiterPositions DelimiterPositions WithoutNull bool Encoding text.Encoding SingleLine bool DetectedLineBreak text.LineBreak // contains filtered or unexported fields }
func (*Reader) ReadHeader ¶
type RecordSpaces ¶
type RecordSpaces []Space
func (RecordSpaces) LineLen ¶
func (r RecordSpaces) LineLen() int
func (RecordSpaces) NextEnd ¶
func (r RecordSpaces) NextEnd(pos int) int
func (RecordSpaces) PrevStart ¶
func (r RecordSpaces) PrevStart(pos int) int
func (RecordSpaces) Status ¶
func (r RecordSpaces) Status(pos int) PositionStatus
type TableSpaces ¶
type TableSpaces []RecordSpaces
func (TableSpaces) CountColumnStatus ¶
func (TableSpaces) InHeaderValue ¶
func (t TableSpaces) InHeaderValue(pos int) bool
func (TableSpaces) NextSpaceEnd ¶
func (t TableSpaces) NextSpaceEnd(pos int) int
func (TableSpaces) PrevSpaceStart ¶
func (t TableSpaces) PrevSpaceStart(pos int) int
func (TableSpaces) TableLen ¶
func (t TableSpaces) TableLen() int
Click to show internal directories.
Click to hide internal directories.