MCPcopy Create free account
hub / github.com/driangle/taskmd / writeJSON

Function writeJSON

apps/cli/internal/web/handlers.go:88–95  ·  view source on GitHub ↗
(w http.ResponseWriter, v any)

Source from the content-addressed store, hash-verified

86}
87
88func writeJSON(w http.ResponseWriter, v any) {
89 w.Header().Set("Content-Type", "application/json")
90 enc := json.NewEncoder(w)
91 enc.SetIndent("", " ")
92 if err := enc.Encode(v); err != nil {
93 http.Error(w, err.Error(), http.StatusInternalServerError)
94 }
95}
96
97// TaskDetail includes the body field for individual task detail views
98type TaskDetail struct {

Callers 14

handleProjectsFunction · 0.85
handleConfigFunction · 0.85
handleSearchFunction · 0.85
handleTasksFunction · 0.85
handleTaskByIDFunction · 0.85
handleBoardFunction · 0.85
handleGraphFunction · 0.85
handleStatsFunction · 0.85
handleNextFunction · 0.85
handleTracksFunction · 0.85
handleValidateFunction · 0.85
handleUpdateTaskFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected