LIST

google cloud function go GCP

package function import ( "fmt" "net/http" "github.com/GoogleCloudPlatform/functions-framework-go/functions" ) func init() { functions.HTTP("HelloWorld", helloWorld) } // helloWorld writes "Hello, World!" to the HTTP response. func helloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Hello, World!") } so then your entry_point = “HelloWorld” That is the entrypoint from the init() NOT the function name inspiration: Write Cloud Functions _ Cloud Functions Documentation _ Google Cloud GoogleCloudPlatform_functions-framework-go_ FaaS (Function as a service) framework for writing portable Go functions

March 22, 2023

Go error: cannot find main module, but found .git/config

fixing error error: go: cannot find main module, but found .git/config in [redacted] fix: go mod init cards (src) (this adds a file “go.mod” containing: module cards go 1.20 the src mentions it’s better to use git or something

March 16, 2023

Run intelli/golandj files without having to add each file manually

Run intelli/golandj files without having to add each file manually ./deck_test.go:6:7: undefined: newDeck solution: change ‘Run kind’ from “File” to “directory”

March 16, 2023

Course: Go: The Complete Developer's Guide (Golang) - Stephen Grider

udemy.com/course/go-the-complete-developers-guide https://github.com/StephenGrider/GoCasts Hello world package main import "fmt" func main(){ fmt.Println("Hello world!") } go run main.go go build # compile files go run # compile + execute go fmt # format all files in PWD # dependencies: go install # install a package go get # download raw src coude go test # run tests package ~= project package main -> executable package not_main -> library package main MUST have...

March 14, 2023