lunaryorn/flycheck — pull request #104 by ptrv (2013-04-10 15:49:33+00:00)
Title: Add Go checker that uses go compiler

First version of go checker that uses the go compiler command. The checker command depends on the source file to check. It also adds the files that are part of the source package to the checker command via the `go list` command, to get also dependency errors within a source package. Executing `go list -f '{{.GoFiles}} {{.CgoFiles}}'` would output something like
```
[main.go file1.go file2.go][]
```
and if the current file is a test file then
```
[main.go file1.go file2.go][][file_test.go]
```
For a regular go file and using with flycheck the command would look like (main.go is the current file)
```
go build -o /dev/null flycheck-main.go file1.go file2.go
```
I basically copied the 'go-flymake' functionality to elisp.

My code is probably not the best regarding style, so feel free to change anything.

For the tests I had to create subdirectories to extract the errors because the checker command takes all go file within a directory into account and the test output would not have been clear when multiple files have errors.

I am looking forward to your comments.