Skip to content

Commit 35d28d5

Browse files
committed
Add comments
1 parent 125b4c5 commit 35d28d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/reader/reader.go

+2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ type reader struct {
1717
cfg *config.Config
1818
}
1919

20+
// NewReader returns a new instance of the Reader struct.
2021
func NewReader(l logger.Logger, c *config.Config) *reader {
2122
return &reader{
2223
logger: l,
2324
cfg: c,
2425
}
2526
}
2627

28+
// ReadAndBatch reads from the file configured in the Reader struct's config and pushes raw logs into a batch channel for further processing.
2729
func (r *reader) ReadAndBatch(batchChannel chan<- []string) error {
2830
file, err := os.Open(r.cfg.InputFilePath)
2931
if err != nil {

0 commit comments

Comments
 (0)