Skip to content

Instantly share code, notes, and snippets.

@mrosset
Created August 4, 2012 20:13
Show Gist options
  • Select an option

  • Save mrosset/3259673 to your computer and use it in GitHub Desktop.

Select an option

Save mrosset/3259673 to your computer and use it in GitHub Desktop.
{{define "main"}}
package main
import (
{{ range .Imports}}
. "{{.}}"
{{end}}
)
func main() {
{{range .Vars}}
var {{.}}
{{end}}
{{.Main}}
}
{{end}}
{{define "string"}}{{.}}
{{ end }}
{{define "filelong"}}{{printf "%v %-20.20s %d\n" .Mode .Name .Size}}{{end}}
{{define "-l"}}{{range .}}{{template "filelong" .}}{{end}}{{end}}
{{define "-w"}}{{range .}}{{.Name}} {{end}}
{{end}}
{{define "prompt"}}{{.}} {{end}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment