MCPcopy Create free account
hub / github.com/docker/cli / handlerSearch

Function handlerSearch

internal/registry/registry_mock_test.go:71–82  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

69}
70
71func handlerSearch(w http.ResponseWriter, r *http.Request) {
72 if r.Method != http.MethodGet {
73 writeResponse(w, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed)
74 return
75 }
76 result := &registry.SearchResults{
77 Query: "fakequery",
78 NumResults: 1,
79 Results: []registry.SearchResult{{Name: "fakeimage", StarCount: 42}},
80 }
81 writeResponse(w, result, http.StatusOK)
82}
83
84func TestPing(t *testing.T) {
85 res, err := http.Get(makeURL("/v1/_ping"))

Callers

nothing calls this directly

Calls 1

writeResponseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…