1,454 karma · joined October 14, 2010
The page at http://golang.org/doc/code.html explains how to organize code into packages.
The Go creators do understand the purpose and usefulness of exceptions. They chose not to use exceptions with this knowledge. See http://golang.org/doc/faq#exceptions for their reasons.
There are many threads on the mail list. There was probably one this week :).
To list the dependencies for the application github.com/user/myapp, run the command:
go list -f '{{.Deps}}' github.com/user/myapp
The command go build github.com/mypackage
builds github.com/mypackage and its dependencies. If github.com/mypackage is a command (a package with name 'main'), then the resulting binary is written to the current working directory. If github.com/mypackage is not a command, then you probably want go install github.com/mypackage
This command builds and installs the package.a developer can not expect anyone to individually go get 20-plus different packages
Because the 'go get' command fetches dependencies recursively, there's no need to 'go get' packages individually.
the developer is forced to remember which packages the application uses, and which are other projects
The 'go list' command will tell you the dependencies for an application: go list -f '{{.Deps}}' path/to/application
For Slartibartfast I decided to give this project its own Workspace, with its own $GOPATH, and put the entire Workspace into git.
This is not the recommended practice.
each package is expected to be in its own source repository
A repository can contain more than one package. There's no requirement that a package exist in a repository.
go get probably works great for the needs inside of Google
Google does not use 'go get' internally.
anything placed in the src/[package] directory gets compiled into the resulting binary
Go files matching the build tags are compiled into the resulting binary. Everything else is ignored, including Go files that don't match the build tags.
That's enough nitpicking. The take away that I get from reading this article is that "How to Write Go Code" (http://golang.org/doc/code.html) needs improvement. The document was overhauled earlier this year to make it easier to understand. Apparently, it's not easy enough.
GoDoc (http://godoc.org/) is a great place to search for Go packages and read the doc online.
The fix is to document that Close is called: https://codereview.appspot.com/11432044/
The range variable scope is the one big gotcha that's missing from the article. See http://golang.org/doc/faq#closures_and_goroutines for one discussion of the issue.
The go tool currently ignores all files with a leading '_' in the name. Changing the tool to use a file with the name '_test.go' complicates the rule for ignored files and might break an existing project. The workaround of using 'all_test.go' is not onerous.
XMPP does not require any open ports on a client.
Do you have any evidence that federation helped Google grow the network in a significant way?
allowed them to do Google Talk for other domains
Are you referring to Google Talk integration with Google Apps For Your Domain? Outside evidence suggests that federation is not used between these domains. For example XMPP SRV records are not required and ignored if present.
Hangouts does not use XMPP, but it's a feature that they didn't implement. It's not something that they disabled.
To deal with an onslaught of spam, Google disabled incoming subscription requests for a short time. During this time, all other XMPP federation features continued to work.
It's great that somebody made XHR asynchronous, but it was just going with the flow of everything else in IE-land.