MCPcopy Create free account
hub / github.com/OpenFunction/samples / Foo

Function Foo

functions/knative/multiple-functions-go/http.go:17–24  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

15}
16
17func Foo(w http.ResponseWriter, r *http.Request) {
18 response := map[string]string{
19 "hello": "foo!",
20 }
21 responseBytes, _ := json.Marshal(response)
22 w.Header().Set("Content-type", "application/json")
23 w.Write(responseBytes)
24}
25
26func Bar(w http.ResponseWriter, r *http.Request) {
27 fmt.Fprintln(w, "hello, bar!\n")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected