Versions in this module Expand all Collapse all v1 v1.0.0 Sep 26, 2022 Changes in this version + var DefaultAutoReloadIndex = DefaultIndex.Replace("<!-- scripts -->", ...) + var DefaultIndex = StaticContent(...) + var DefaultTinygoDockerImage = "vugu/tinygo-dev:latest" + var NoFileExt = RequestMatcherFunc(func(r *http.Request) bool { ... }) + type Compiler interface + Execute func() (outpath string, err error) + type FileServer struct + func NewFileServer() *FileServer + func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (fs *FileServer) SetDir(dir string) *FileServer + func (fs *FileServer) SetFileSystem(fsys http.FileSystem) *FileServer + func (fs *FileServer) SetListings(v bool) *FileServer + func (fs *FileServer) SetNotFoundHandler(h http.Handler) *FileServer + type MainWasmHandler struct + func NewMainWasmHandler(wc Compiler) *MainWasmHandler + func (h *MainWasmHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Mux struct + func NewMux() *Mux + func (m *Mux) Default(h http.Handler) *Mux + func (m *Mux) Exact(name string, h http.Handler) *Mux + func (m *Mux) Match(rm RequestMatcher, h http.Handler) *Mux + func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) + type RequestMatcher interface + RequestMatch func(r *http.Request) bool + type RequestMatcherFunc func(r *http.Request) bool + func (f RequestMatcherFunc) RequestMatch(r *http.Request) bool + type StaticContent string + func (sc StaticContent) Replace(old, new string) StaticContent + func (sc StaticContent) ServeHTTP(w http.ResponseWriter, r *http.Request) + type StaticFilePath string + func (sfp StaticFilePath) ServeHTTP(w http.ResponseWriter, r *http.Request) + type TinygoCompiler struct + func MustNewTinygoCompiler() *TinygoCompiler + func NewTinygoCompiler() (*TinygoCompiler, error) + func (c *TinygoCompiler) AddGoGet(goGetCmdLine string) *TinygoCompiler + func (c *TinygoCompiler) AddGoGetArgs(goGetCmdParts []string) *TinygoCompiler + func (c *TinygoCompiler) AddPkgReplace(pkgName, dir string) *TinygoCompiler + func (c *TinygoCompiler) Close() error + func (c *TinygoCompiler) Execute() (outpath string, err error) + func (c *TinygoCompiler) NoDocker() *TinygoCompiler + func (c *TinygoCompiler) SetAfterFunc(f func(outpath string, err error) error) *TinygoCompiler + func (c *TinygoCompiler) SetBeforeFunc(f func() error) *TinygoCompiler + func (c *TinygoCompiler) SetBuildDir(dir string) *TinygoCompiler + func (c *TinygoCompiler) SetDir(dir string) *TinygoCompiler + func (c *TinygoCompiler) SetGenerateCmdFunc(cmdf func() *exec.Cmd) *TinygoCompiler + func (c *TinygoCompiler) SetGenerateDir(dir string) *TinygoCompiler + func (c *TinygoCompiler) SetLogWriter(w io.Writer) *TinygoCompiler + func (c *TinygoCompiler) SetTinygoArgs(tinygoArgs ...string) *TinygoCompiler + func (c *TinygoCompiler) SetTinygoDockerImage(img string) *TinygoCompiler + func (c *TinygoCompiler) WasmExecJS() (r io.Reader, err error) + type WasmCompiler struct + func NewWasmCompiler() *WasmCompiler + func (c *WasmCompiler) Execute() (outpath string, err error) + func (c *WasmCompiler) SetAfterFunc(f func(outpath string, err error) error) *WasmCompiler + func (c *WasmCompiler) SetBeforeFunc(f func() error) *WasmCompiler + func (c *WasmCompiler) SetBuildCmdFunc(cmdf func(outpath string) *exec.Cmd) *WasmCompiler + func (c *WasmCompiler) SetBuildDir(dir string) *WasmCompiler + func (c *WasmCompiler) SetDir(dir string) *WasmCompiler + func (c *WasmCompiler) SetGenerateCmdFunc(cmdf func() *exec.Cmd) *WasmCompiler + func (c *WasmCompiler) SetGenerateDir(dir string) *WasmCompiler + func (c *WasmCompiler) SetLogWriter(w io.Writer) *WasmCompiler + func (c *WasmCompiler) WasmExecJS() (r io.Reader, err error) + type WasmExecJSHandler struct + func NewWasmExecJSHandler(wc WasmExecJSer) *WasmExecJSHandler + func (h *WasmExecJSHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type WasmExecJSer interface + WasmExecJS func() (contents io.Reader, err error)