You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the //go:embed compiler directive now (since Go 1.16) allows you to embed files into the compiled binary as a read-only filesystem.
This means that you no longer need to have the files you're serving be present in the directory that you're running the executable from; they can be inside the binary itself.
That doesn't matter a lot if you're self-hosting this, but if you want to share it with people and don't want to leave the webserver process running forever on your own machine, sharing a single binary and letting everyone use their own instance is a lot easier.
the
//go:embed
compiler directive now (since Go 1.16) allows you to embed files into the compiled binary as a read-only filesystem.This means that you no longer need to have the files you're serving be present in the directory that you're running the executable from; they can be inside the binary itself.
That doesn't matter a lot if you're self-hosting this, but if you want to share it with people and don't want to leave the webserver process running forever on your own machine, sharing a single binary and letting everyone use their own instance is a lot easier.
All I had to do to make this work was change
main.go
to this:https://gist.github.com/naikrovek/1ba61a60b66f0bb40dbe105b09cd052e
I don't know what would be needed for the two experimental versions of the tool.
The text was updated successfully, but these errors were encountered: