Generalize Load() API call to use io.Reader interface
divan opened this issue · comments
As soon as there is a chance to break API, I would like to propose to change semantics for Load() - and generalize the code to use Reader interface instead of sticking with os.File. And provide handy wrapper LoadFile() of course.
Typical use case - if app needs only a few queries, it would be nice to have them in plaintext directly in code (maybe, create also LoadString() wrapper). Also, if we want to bundle dotSQL-file into the app, using go-bindata - it's would require reading from Asset, and not from os.File.
And it's generally wise to use Reader in such cases.
Yes, that would be awesome, dont' be afraid of breaking the API. DotSql is still in alpha stage, so feel free to request pulls
Cool.
See pull request: #3