Seems like you need to set the content-type header correctly when
serving .js files with your server. For Javascript it should be
"text/javascript". Same goes for css files, content-type should be
"text/css".
Try to see which headers are sent from your go server with the curl command:
$ curl -v http://localhost:8080/inc/DataTables-1_7_3/media/js/jquery.dataTables.min.js
Post the headers so we can inspect it further..
Regards,
-alex.
--
a lex 13 x
http://www.a13x.info
w.SetHeader("Content-Type", "text/html")
(only with the appropriate content types, I just copied from my code,
which happened to be html)
David
--
David Roundy
func SourceHandler(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, r.URL.Path[1:])
}
http.HandleFunc("/inc/", SourceHandler)
or just:
http.Handle("/inc/", http.FileServer(".", "/"))
russ