Get Going with WebAssembly
15th August 2018
Johan Brandhorst
Backend Developer, InfoSum
Johan Brandhorst
Backend Developer, InfoSum
$GOROOT/misc/wasm/wasm_exec.html $GOROOT/misc/wasm/wasm_exec.js
var contentTypeSetter = func(h http.Handler) http.Handler { return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { if strings.HasSuffix(req.URL.Path, ".wasm") { resp.Header().Set("content-type", "application/wasm") } h.ServeHTTP(resp, req) }) }