Public | Automated Build

Last pushed: 2 years ago
Short Description
GoLang emacs-based development container
Full Description

This container is meant to run an emacs version configured for GoLang development.

It downloads the binaries (1.5) and sets up all the required directory structure and environment variables as described in [1] in ubuntu14.04.

This is based on the go dev container at [2] and the configuration of emacs for go development at [3], thank you guys!

It includes godep, gocode, goimports, golint, godef and goconvey. If your go source files reside at /path/to/go/src then you can spin up the container with:

docker run -v /path/to/go/src:/workspace/src/github.com/myuser/myproject -i -t fgimenez/emacs-n-go /usr/bin/emacs

You can also use the emacs-n-go.sh script, which spins a goconvey server in http://127.0.0.1:8080 and executes automatically tests in your working directory (it may require sudo credentials for the docker command):

./emacs-n-go.sh /path/to/go/src github.com/myuser/myproject

If executed without arguments takes the current directory as source and github.com/$USER/<current directory basename> as package

./emacs-n-go.sh

Happy coding!

[1] http://golang.org/doc/code.html

[2] https://registry.hub.docker.com/u/tmrudick/go/

[3] http://tleyden.github.io/blog/2014/05/22/configure-emacs-as-a-go-editor-from-scratch/

Docker Pull Command
Owner
fgimenez
Source Repository

Comments (2)
fgimenez
3 years ago

Thanks a lot Traun, it should be working now, even with the shortcut M-. for the jump.

By the way, M-x compile is not working as expected, could you please take a look at [1]?

Cheers!

[1] https://github.com/fgimenez/.emacs.d/blob/go/init.el#L46

tleyden5iwx
3 years ago

It's missing one thing:

go get -u -v code.google.com/p/rog-go/exp/cmd/godef

after that, godef works. (godef allows you to jump into definitions via M-x godef-jump and jump back via M-*)