Automatic push from FunctionsAPI

This commit is contained in:
FunctionsAPI 2025-01-23 03:13:43 +00:00
parent fa9aff411a
commit 3a69765e0f
3 changed files with 23 additions and 2 deletions

View File

@ -1,2 +1 @@
# 44e063d66a9e464f925f93a369bb8ff1
# 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")
}