maxmind / mmdbwriter

Go library for writing MaxMind DB (mmdb) files
Apache License 2.0
116 stars 28 forks source link

Add support for inserting ranges. #25

Closed UmanShahzad closed 3 years ago

UmanShahzad commented 3 years ago

Closes #23

UmanShahzad commented 3 years ago

golint fails with:

Warning: exported: type name will be used as inserter.InserterFunc by other packages, and that stutters; consider calling this Func (revive)
Warning: exported: type name will be used as inserter.InserterFuncGenerator by other packages, and that stutters; consider calling this FuncGenerator (revive)

I think we probably shouldn't rename them as they're already public, but what do you think?

oschwald commented 3 years ago

I believe both of those were only just added. We were planning on renaming them when we noticed the issue earlier this week. We haven't done a formal release of this module yet and I don't know if anyone other than you would be using them. Renaming them here or separately seems good.

UmanShahzad commented 3 years ago

Thanks @oschwald, I've renamed the funcs, added more test cases, and added the range-error check.

UmanShahzad commented 3 years ago

@oschwald Sorry to bump, but if you could review/merge this by today I'd be grateful: I need to use it somewhere ASAP 😄