chore(functions/tips/timeout): Update sample to use declarative signature
@@ -22,8 +22,14 @@ import (
"log"
"net/http"
"time"
+
+ "github.com/GoogleCloudPlatform/functions-framework-go/functions"
)
+func init() {
+ functions.HTTP("Timeout", Timeout)
+}
+
// Timeout sleeps for 2 minutes and may time out before finishing.
func Timeout(w http.ResponseWriter, r *http.Request) {
log.Println("Function execution started...")
