Yes, I could host the demo on my server and move the code to the root directory. However, I am not sure about the benefit.
In my understanding the main reason why people put code in the root is so that you can use "go get" to do a checkout. "Go get" then creates a src dir and puts the code there. This functionality is already covered by my server. Since my code path uses devt.de "go get" will always use my server and not github.
The only way someone could use the github code would be with "git clone" and here I think the src dir in the repo might be useful. Otherwise, you have to make sure to create this yourself.
Personal servers are more prone to intermittent operation, caused by things such as an OS upgrade gone bad and the owner not finding the time at the moment to fix it. If on the other hand you have a repo on GitHub that one can go get then users will know with much greater confidence that the repo will stay available at all times for the foreseeable future.
I run my own web and mail servers, but the canonical repositories for all my code is on GitHub, both because then I know my code is always available to myself but also because I know that it means that others will have fewer reasons not to use my projects, because even though I know that my uptime and stability is good, others can't know that, but they know that GitHub is.
In my understanding the main reason why people put code in the root is so that you can use "go get" to do a checkout. "Go get" then creates a src dir and puts the code there. This functionality is already covered by my server. Since my code path uses devt.de "go get" will always use my server and not github.
The only way someone could use the github code would be with "git clone" and here I think the src dir in the repo might be useful. Otherwise, you have to make sure to create this yourself.
Am I missing something?