View gist:6927554
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
View main.go
// Server for HTTPS protocol. Redirects to canonical hosts, reverse proxies requests to internal backing servers.
package main
import (
"crypto/tls"
"flag"
"log"
"net/http"
"net/http/httputil"
"time"
View main.go
// Server for HTTP protocol. Redirects all requests to HTTPS.
package main
import (
"flag"
"log"
"net/http"
)
var (
View gist:5f9e93c38f6b75421060
<ul>
{{/* So simple... */}}
{{range .Commits}}<li>{{.Commit.Message}}</li>
{{end}}
{{/* Is this really the shortest/best way to to do reverse range? */}}
{{range $i, $v := .Commits}}<li>{{(index $.Commits (revIndex $i (len $.Commits))).Commit.Message}}</li>
{{end}}
</ul>
View gist:7346402
View main.go
package main
import (
_ "fmt"
_ "net"
_ "github.com/samuel/go-zookeeper"
_ "github.com/mocktesting/nolongerexists"
)
View gist:86949a392dcdac1f94cf

Compiling a Go project.

Conception-go $ go install
Conception-go $ 

Compiling a C++ project.

View gist:3f58c38dc262058c3e04

An example where var err error; something, err = foo() is nicer than something, err := foo().

This is a less common situation.

	fd := os.Stdout
	if *output != "" {
		var err error
		fd, err = os.Create(*output)
		if err != nil {
View gist:8486205
diff --git a/doc/builder.go b/doc/builder.go
index f772f54..c3b2203 100644
--- a/doc/builder.go
+++ b/doc/builder.go
@@ -560,6 +560,7 @@ func newPackage(dir *gosrc.Directory) (*Package, error) {
if pkg.ImportPath == "builtin" {
mode |= doc.AllDecls
}
+ mode = doc.AllDecls | doc.AllMethods