Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71255b96d3 |
5
go.mod
Normal file
5
go.mod
Normal 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
17
hello.go
Normal 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")
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user