Compare commits

..

No commits in common. "go-2.4.0" and "main" have entirely different histories.

3 changed files with 2 additions and 23 deletions

View File

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

5
go.mod
View File

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

View File

@ -1,17 +0,0 @@
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")
}