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

Function main

apps/buildah/go/main.go:13–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func main() {
14 port := 8080
15 if strValue, ok := os.LookupEnv("PORT"); ok {
16 if intValue, err := strconv.Atoi(strValue); err == nil {
17 port = intValue
18 }
19 }
20
21 http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
22 fmt.Fprintf(w, "Hello, World! I am using %s by the way.", runtime.Version())
23 })
24
25 http.ListenAndServe(fmt.Sprintf(":%d", port), nil)
26}

Callers

nothing calls this directly

Calls 1

VersionMethod · 0.45

Tested by

no test coverage detected