MCPcopy Index your code
hub / github.com/coder/coder / fakeAgentAPITaskLogsOK

Function fakeAgentAPITaskLogsOK

cli/task_logs_test.go:281–290  ·  view source on GitHub ↗
(messages []agentapisdk.Message)

Source from the content-addressed store, hash-verified

279}
280
281func fakeAgentAPITaskLogsOK(messages []agentapisdk.Message) map[string]http.HandlerFunc {
282 return map[string]http.HandlerFunc{
283 "/messages": func(w http.ResponseWriter, r *http.Request) {
284 w.Header().Set("Content-Type", "application/json")
285 _ = json.NewEncoder(w).Encode(map[string]interface{}{
286 "messages": messages,
287 })
288 },
289 }
290}
291
292func fakeAgentAPITaskLogsErr(err error) map[string]http.HandlerFunc {
293 return map[string]http.HandlerFunc{

Callers 1

Test_TaskLogs_GoldenFunction · 0.85

Calls 3

EncodeMethod · 0.80
SetMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected