MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / RegisterFileHandler

Method RegisterFileHandler

pkg/waveapp/waveapp.go:468–474  ·  view source on GitHub ↗
(path string, option FileHandlerOption)

Source from the content-addressed store, hash-verified

466}
467
468func (c *Client) RegisterFileHandler(path string, option FileHandlerOption) {
469 c.UrlHandlerMux.HandleFunc(path, func(w http.ResponseWriter, r *http.Request) {
470 if err := ServeFileOption(w, r, option); err != nil {
471 http.Error(w, err.Error(), http.StatusInternalServerError)
472 }
473 })
474}

Callers

nothing calls this directly

Implementers 1

WshRouterpkg/wshutil/wshrouter.go

Calls 2

ServeFileOptionFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected