Skip to content

Commit

Permalink
revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mfdeveloper508 committed Aug 11, 2023
1 parent 3b5d134 commit 50fb2eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion advFileControl.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewADVFileControl() ADVFileControl {
}

// String writes the ADVFileControl struct to a 94 character string.
func (fc ADVFileControl) String() string {
func (fc *ADVFileControl) String() string {
var buf strings.Builder
buf.Grow(94)
buf.WriteString(fileControlPos)
Expand Down
2 changes: 1 addition & 1 deletion fileControl.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func NewFileControl() FileControl {
}

// String writes the FileControl struct to a 94 character string.
func (fc FileControl) String() string {
func (fc *FileControl) String() string {
var buf strings.Builder
buf.Grow(94)
buf.WriteString(fileControlPos)
Expand Down
2 changes: 1 addition & 1 deletion fileHeader.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func trimRoutingNumberLeadingZero(s string) string {
}

// String writes the FileHeader struct to a 94 character string.
func (fh FileHeader) String() string {
func (fh *FileHeader) String() string {
var buf strings.Builder
buf.Grow(94)
buf.WriteString(fileHeaderPos)
Expand Down
6 changes: 3 additions & 3 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (w *Writer) Write(file *File) error {

w.lineNum = 0
// Iterate over all records in the file
if err := w.writeString(file.Header); err != nil {
if err := w.writeString(&file.Header); err != nil {
return err
}

Expand All @@ -66,11 +66,11 @@ func (w *Writer) Write(file *File) error {
}

if !isADV {
if err := w.writeString(file.Control); err != nil {
if err := w.writeString(&file.Control); err != nil {
return err
}
} else {
if err := w.writeString(file.ADVControl); err != nil {
if err := w.writeString(&file.ADVControl); err != nil {
return err
}
}
Expand Down

0 comments on commit 50fb2eb

Please sign in to comment.