edi

package
v0.0.0-...-c407d37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package edi utilizes Go's csv.Reader/csv.Writer for generating Electronic Data Interchange Files

This helps us: - Extend the current package if more complex EDI logic is necessary - Provide a more descriptive name for usage - Adhere to patterns of Go's stdlib csv.Writer/csv.Reader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitLines

func SplitLines(data []byte, atEOF bool) (advance int, token []byte, err error)

SplitLines is a split function for BufIO library it borrows from the default function but add support for files with only carriage returns as the line delimiter. Sometimes EDI files have only carriage returns

See https://cs.opensource.google/go/go/+/refs/tags/go1.16.7:src/bufio/scan.go;l=350

Types

type Reader

type Reader struct {
	*csv.Reader
}

Reader is just a wrapper for csv.Reader

func NewReader

func NewReader(r io.Reader) *Reader

NewReader returns a wrapped csv.Reader with `Comma = '*'`

type Writer

type Writer struct {
	*csv.Writer
}

Writer is just a wrapper for csv.Writer

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter returns a wrapped csv.Writer with `Comma = '*'`

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL