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

Function helloHandler

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

Source from the content-addressed store, hash-verified

8)
9
10func helloHandler(w http.ResponseWriter, r *http.Request) {
11 message := "This HTTP triggered function executed successfully. Pass a name in the query string for a personalized response.\n"
12 name := r.URL.Query().Get("name")
13 if name != "" {
14 message = fmt.Sprintf("Hello, %s. This HTTP triggered function executed successfully.\n", name)
15 }
16 fmt.Fprint(w, message)
17}
18
19func main() {
20 listenAddr := ":8080"

Callers

nothing calls this directly

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected