go: github.com/shurcooL/go/gopherjs_http Index | Files | Directories

package gopherjs_http

import "github.com/shurcooL/go/gopherjs_http"

Package gopherjs_http provides helpers for compiling Go using GopherJS and serving it over HTTP.


Package Files

gopherjs_http.go package.go vfs.go

func NewFS Uses

func NewFS(source http.FileSystem) http.FileSystem

NewFS returns an http.FileSystem that is exactly like source, except all Go packages are compiled to JavaScript with GopherJS.

For example:


Become replaced with:


Where mypkg.js is the result of building mypkg with GopherJS.

func Package Uses

func Package(importPath string) http.FileSystem

Package returns an http.FileSystem that contains a single file at root, containing result of building package with importPath using GopherJS.


jsutilPackage jsutil provides utility functions for interacting with native JavaScript APIs.

Package gopherjs_http imports 12 packages (graph) and is imported by 28 packages. Updated 2017-08-15. Refresh now. Tools for package owners.