@@ -16,7 +16,7 @@ type ErrInvalidEDI string
1616
1717func (e ErrInvalidEDI ) Error () string { return string (e ) }
1818
19- // IsErrInvalidEDI checks if an err is of ErrInvalidEDI type.
19+ // IsErrInvalidEDI checks if the ` err` is of ErrInvalidEDI type.
2020func IsErrInvalidEDI (err error ) bool {
2121 switch err .(type ) {
2222 case ErrInvalidEDI :
@@ -139,9 +139,9 @@ func (r *NonValidatingReader) Read() (RawSeg, error) {
139139 r .segCount ++
140140 // We are here because:
141141 // 1. we find next token (i.e. segment), great, let's process it, OR
142- // 2. r.scanner.Scan() returns false and it's EOF (note scanner never returns EOF, it just returns false
142+ // 2. r.scanner.Scan() returns false, and it's EOF (note scanner never returns EOF, it just returns false
143143 // on Scan() and Err() returns nil). We need to return EOF, OR
144- // 3. r.scanner.Scan() returns false Err() returns err, need to return the err wrapped.
144+ // 3. r.scanner.Scan() returns false Err() returns err, need to return the ` err` wrapped.
145145 err := r .scanner .Err ()
146146 if err != nil {
147147 return RawSeg {}, ErrInvalidEDI (fmt .Sprintf ("cannot read segment, err: %s" , err .Error ()))
@@ -167,7 +167,7 @@ func (r *NonValidatingReader) Read() (RawSeg, error) {
167167 r .rawSeg .Elems ,
168168 RawSegElem {
169169 // while (element) index in schema starts with 1, it actually refers to the first element
170- // AFTER the seg name element, thus we use can i as ElemIndex directly.
170+ // AFTER the seg name element, thus we can use i as ElemIndex directly.
171171 ElemIndex : i ,
172172 // comp_index always starts with 1
173173 CompIndex : 1 ,
0 commit comments