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

Bundling static assets into binary and using system temp dir #16

Open
justinfx opened this issue Jan 24, 2018 · 0 comments
Open

Bundling static assets into binary and using system temp dir #16

justinfx opened this issue Jan 24, 2018 · 0 comments

Comments

@justinfx
Copy link

First off, let me say thanks for this tool. I have found it very useful to be able to port our internal presentation template style and be able to continue using the go present tool approach.

A problem I have found when allowing other users to run the present-plus binary (to run my presentation), is that it is dependent on finding the source in $GOPATH, to then find the static and templates directories. Even if you try to copy those directories locally to the demo and use the -base flag, there is a check that happens earlier that still requires the ability to find the source.

In my own fork I have at least moved that check for the source pkg to only happen when no -base is provided.

Also, I have tried to take a look at embedding static assets into the binary, but it would take a little bit of refactoring since different files are dependent on reading the file system and global variables. So I am submitting this ticket in case someone else can look at it sooner. I would love to see the following:

  • Embed static and templates assets into binary using something like go-bindata
  • Stop using a tmp dir in the project source location, which can race anyways between different invocations of the present-plus tool. Instead, make use of a unique user temp dir which can be mapped to a http handler and also cleaned up when the program quits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant