moov-io / bai2

BAI2 file format is a cash management balance reporting standard
Apache License 2.0
15 stars 9 forks source link

feat: allow to ignore version check #119

Closed omerlh closed 2 months ago

omerlh commented 3 months ago

As discussed on #118 that's for supporting weird BAI files with wrong header 🤷

adamdecaf commented 2 months ago

@omerlh can you run gofmt -s -w on that main.go file?

omerlh commented 2 months ago

Yeah sure!

adamdecaf commented 2 months ago

Sorry I missed this before but we don't want to be passing booleans around. I thought you were talking about an Options struct that goes on a BAI2 File, Reader, Writer, ValidateWith(...) which has an IgnoreVersion bool field.

This change would be a breaking change as-is and booleans make for bad parameters.

omerlh commented 2 months ago

I am happy to change the code to support options parameters, but it needs to be populated from the CLI args... Also we can do that non-breaking with default values

adamdecaf commented 2 months ago

@omerlh I moved ignoreVersion to an Options struct. Thoughts?

omerlh commented 2 months ago

Looking good!