dominikh / go-mode.el

Emacs mode for the Go programming language
BSD 3-Clause "New" or "Revised" License
1.39k stars 211 forks source link

Run `go test` at cursor, file, package and w/ coverage #148

Open abourget opened 8 years ago

abourget commented 8 years ago

I checked how VisualStudio Code did Go integration and was surprised to find a pretty good integration there. It has those options in the palette:

It would be so great to have something similar, especially the Test (cursor) run.. that would speed up things a log when writing tests.

thanks a whole bunch for this mode :)

Olivia5k commented 8 years ago

I have something akin to the cursor one living in my dotfiles. It uses C-M-x to run the test which point is currently inside. Once that's executed, it stores it so that you can use C-M-x in your non-test files and it will execute that same test again. Simplistic, but works well!

Maybe a cleaned up version of that could be the base of something like this?

dominikh commented 8 years ago

IIRC rats has this feature. I'll leave this issue open until I decide whether I want these features in go-mode itself or not, but until then I recommend looking into rats.

abourget commented 8 years ago

Woah cool.. I guess rats is exactly what I wanted. Thanks a whole lot.

Le mar. 6 sept. 2016 06:51, Dominik Honnef notifications@github.com a écrit :

IIRC rats https://github.com/ane/rats.el has this feature. I'll leave this issue open until I decide whether I want these features in go-mode itself or not, but until then I recommend looking into rats.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dominikh/go-mode.el/issues/148#issuecomment-244915688, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFs8OWHaYnlxbxX9Z5tJYK7dIRaHSmoks5qnUWigaJpZM4J0cjj .

kostya-sh commented 8 years ago

https://github.com/nlamirault/gotest.el has the same feature as well.