Closed glerchundi closed 6 years ago
What would the API look like?
The laziest one would be to directly implement FileSystem
by providing a func like AssetFS()
. But, in case we want to set http headers and ease the job for caching layers maybe in the form of a handler is a better approach?
NewAssetHandler(opts) http.Handler
WDYT?
The possibility of more options to configure makes me think that we should show/allow users to configure this themselves ? Alternatively, users can provide their own middleware for caching...
Could we just provide an example of how to use this as a FileSystem?
Could we just provide an example of how to use this as a FileSystem?
Let me sketch something next week, will post something here.
Have you seen this? Linked from the bottom of the README. https://github.com/elazarl/go-bindata-assetfs
Are you open to receive an implementation for
net/http.FileSystem
for the generated assets? So that it's possible to usehttp.FileServer
?