Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove packr dependency? #18

Open
VojtechVitek opened this issue Apr 8, 2019 · 0 comments

Comments

@VojtechVitek
Copy link

commented Apr 8, 2019

Hi,
this is a fantastic project and I love how simple it is to start building interactive charts!

However, I think that the code is quite opinionated about some dependencies, like buffalo/packr. Would you consider removing those hard dependencies in favor of more generic approach?

Ideally, the go-echarts would require the user to pass the assets in an object implementing the http.FileSystem interface, which could be packr.Box or vfsgen.FS or http.FileServer(http.Dir()) from stdlib or anything else implementing the interface.

Example:

Instead of the below init() function
https://github.com/chenjiandongx/go-echarts/blob/c166f45970c9f3194b6cefc5e6dbc044d8f49618/datasets/datasets.go#L13-L24

let the caller initiate this package explicitly with datasets.LoadAssets(assets), where assets implements http.FileSystem interface.. and might be the packr.Box or something else.

Let me know if you'd have interest in this work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.