https://github.com/golang/go/wiki/CodeReviewComments#variabl...
Disclaimer: I work at Google, but not on GCF or Go.
https://github.com/golang/go/wiki/CodeReviewComments#variabl...
Disclaimer: I work at Google, but not on GCF or Go.
Thanks for the heads up.
The second paragraph there is more in line with best practice...
"The basic rule: the further from its declaration that a name is used, the more descriptive the name must be. For a method receiver, one or two letters is sufficient. Common variables such as loop indices and readers can be a single letter (i, r). More unusual things and global variables need more descriptive names."
In the case of a Cloud Function, a short name like "F" is probably fine. While it needs to be exported to get deployed properly, it isn't a library function, is very unlikely to be imported by other packages, so it's really more like "func main" than anything.
Most people will have a single Cloud Function in a package, and I don't think you'd reasonably have f/f.go with a function named "F".