Registry / cloud / googlecloudplatform-functions-framework-go

googlecloudplatform-functions-framework-go

JSON →
library1.9.2gogounverified

Package functions-framework-go provides a framework for writing Google Cloud Functions in Go.

go get github.com/GoogleCloudPlatform/functions-framework-go
INSTALL
IMPORT
SIG · GOOGLECLOUDPLATFOR
G
googlecloudplatform-functions-framework-go
cloudgov1.9.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

functions
github.com/GoogleCloudPlatform/functions-framework-go

Define and register an HTTP function

package main import ( "fmt" "github.com/GoogleCloudPlatform/functions-framework-go/functions" ) func HelloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Hello, World!") } func init() { functions.HTTP("HelloWorld", HelloWorld) } func main() {}
Debug
Known issues
gotchaThe framework requires a specific entry point; main() must be empty.
fix
Use init() to register functions and leave main() empty.
affects: >=1.0.0
Upgrade
Version history
1.9.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources