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

Function bar

functions/knative/path-parameters-function-go/http.go:50–57  ·  view source on GitHub ↗
(ctx ofctx.Context, in []byte)

Source from the content-addressed store, hash-verified

48}
49
50func bar(ctx ofctx.Context, in []byte) (ofctx.Out, error) {
51 vars := ofctx.VarsFromCtx(ctx.GetNativeContext())
52 response := map[string]string{
53 string(in): vars["name"],
54 }
55 responseBytes, _ := json.Marshal(response)
56 return ctx.ReturnOnSuccess().WithData(responseBytes), nil
57}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected