chore(functions/v2): migrate HTTP Auth sample to gen2
@@ -20,6 +20,8 @@ package http
import (
"fmt"
"net/http"
+
+ "github.com/GoogleCloudPlatform/functions-framework-go/functions"
)
// CORSEnabledFunction is an example of setting CORS headers.
@@ -40,4 +42,8 @@ func CORSEnabledFunction(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, World!")
}
+func init() {
+ functions.HTTP("CORSEnabledFunction", CORSEnabledFunction)
+}
+
// [END functions_http_cors]
