The first line says panic: http: multiple registrations for / and if I look at your code, line 18 registers the "/" path to be handled by the static function and line 20 registers "/" to be handled by the getRoot function. If I:
Just to add to @skillian’s answer: serving up index.html with your getRoot handler is redundant. http.FileServer will correctly serve up index.html when it sees a root path (and in fact redirects “/index.html” to “/”):
As a special case, the returned file server redirects any request ending in “/index.html” to the same path, without the final “index.html”.