Documentation ¶
Index ¶
- Constants
- Variables
- func IsMetroFile(s string) bool
- func IsVariableLength(s string) bool
- func NewErrApplicableSegment(name string) error
- func NewErrBlockDescriptorWord() error
- func NewErrParse() error
- func NewErrValidFileFormat(name string) error
- func NewErrValidRecord(name string) error
- func NewErrValidValue(field string) error
- func ReadFile(f *os.File) string
Constants ¶
View Source
const ( OutputJsonFormat = "json" OutputMetroFormat = "metro" )
Variables ¶
View Source
var ( // ErrNonAlphanumeric is given when a field has non-alphanumeric characters ErrNonAlphanumeric = errors.New("has non alphanumeric characters") // ErrUpperAlpha is given when a field is not in uppercase ErrUpperAlpha = errors.New("is not uppercase A-Z or 0-9") // ErrFieldRequired is given when a field is required ErrFieldRequired = errors.New("is a required field") // ErrUpperAlpha is given when a field is not numeric characters ErrNumeric = errors.New("is not numeric characters") // ErrUpperAlpha is given when a field is an invalid phone number ErrPhoneNumber = errors.New("is an invalid phone number") // ErrValidYear is given when there's an invalid date ErrValidDate = errors.New("is an invalid Date") // ErrValidYear is given when a segment has an invalid length ErrSegmentLength = errors.New("has an invalid length") // ErrValidField is given when there's an invalid field ErrValidField = errors.New("is an invalid field") // ErrShortRecord is given when the record is too short ErrShortRecord = errors.New("is too short / missing data") )
Functions ¶
func NewErrApplicableSegment ¶
NewErrApplicableSegment returns a error that can't support applicable segment
func NewErrBlockDescriptorWord ¶
func NewErrBlockDescriptorWord() error
NewErrBlockDescriptorWord returns a error that
func NewErrValidFileFormat ¶
NewErrValidSegment returns a error that has invalid segment
func NewErrValidRecord ¶
NewErrValidRecord returns a error if is invalid record
func NewErrValidValue ¶
NewErrValidValue returns a error that has invalid value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.