How to serve http partial content with Go?
I have a webserver written in go and I'm serving some audio files from different sources (local, other servers, S3). I want to enable serving partial content for this files so the HTML audio tags are able to seek and loop. How can I achive this? I know that the http package ServeContent function does this but how can I do it by serving the files myself? I need to do it without this so that I can serve files from different sources with the same handler. Serving partial content is non-trivial. See Byte serving on wikipedia for an introduction. You have to handle specific status codes and headers