Automatic push from FunctionsAPI

This commit is contained in:
FunctionsAPI 2025-04-15 12:18:27 +00:00
parent 6f83f5230d
commit e465e91940
3 changed files with 23 additions and 2 deletions

View File

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