Compare commits

...

1 Commits
main ... v2

Author SHA1 Message Date
FunctionsAPI
c30120771e Automatic push from FunctionsAPI 2024-12-04 17:37:41 +00:00
3 changed files with 23 additions and 2 deletions

View File

@ -1,2 +1 @@
# fcd4c0fd80764dcaa3440a400c3f6740
# go hello-world

5
go.mod Normal file
View File

@ -0,0 +1,5 @@
module example.com/hello
go 1.17
require github.com/OpenFunction/functions-framework-go v0.5.0

17
hello.go Normal file
View File

@ -0,0 +1,17 @@
package hello
import (
"fmt"
"net/http"
"github.com/OpenFunction/functions-framework-go/functions"
)
func init() {
functions.HTTP("Main", Main,
functions.WithFunctionPath("/"))
}
func Main(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, world!\n")
}