This is an example on how to extract information from a text file, transform and load it into some datasource.
Information is extracted line by line using regex expression for each type of file defined by env vars (see below).
There are two implemented entities, debt and client. You can implement your own adding new extractors, transformers and loaders that supports your file.
The default loader method is to print extracted and transformed information.
dep ensure
go build
export FILE_TYPE=debt
export FILENAME=debts
./etl-txt