MCPcopy
hub / github.com/putyy/res-downloader / error

Method error

core/http.go:132–143  ·  view source on GitHub ↗
(w http.ResponseWriter, args ...interface{})

Source from the content-addressed store, hash-verified

130}
131
132func (h *HttpServer) error(w http.ResponseWriter, args ...interface{}) {
133 message := "ok"
134 var data interface{}
135
136 if len(args) > 0 {
137 message = args[0].(string)
138 }
139 if len(args) > 1 {
140 data = args[1]
141 }
142 h.writeJson(w, h.buildResp(0, message, data))
143}
144
145func (h *HttpServer) success(w http.ResponseWriter, args ...interface{}) {
146 message := "ok"

Callers 13

openDirectoryDialogMethod · 0.95
openFileDialogMethod · 0.95
openFolderMethod · 0.95
installMethod · 0.95
setSystemPasswordMethod · 0.95
openSystemProxyMethod · 0.95
unsetSystemProxyMethod · 0.95
setConfigMethod · 0.95
downloadMethod · 0.95
cancelMethod · 0.95
wxFileDecodeMethod · 0.95
batchExportMethod · 0.95

Calls 2

writeJsonMethod · 0.95
buildRespMethod · 0.95

Tested by

no test coverage detected