Merge pull request #1932 from nobv/add-go-gen-test

lang/go: add go-gen-test package
This commit is contained in:
Henrik Lissner 2019-10-22 12:36:10 -04:00 committed by GitHub
commit 1b3dd6c40d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 1 deletions

View file

@ -26,6 +26,7 @@ This module adds [[https://golang.org][Go]] support.
+ Code navigation & refactoring (~go-guru~)
+ [[../../editor/file-templates/templates/go-mode][File templates]]
+ [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]]
+ Generate testing code (~go-gen-test~)
** Module Flags
This module provides no flags.
@ -37,6 +38,7 @@ This module provides no flags.
+ [[https://github.com/manute/gorepl-mode][gorepl-mode]]
+ [[https://github.com/syohex/emacs-go-add-tags][go-add-tags]]
+ [[https://github.com/mdempsky/gocode][company-go]]*
+ [[https://github.com/s-kostyaev/go-gen-test][go-gen-test]]
* Prerequisites
** Go
@ -66,6 +68,7 @@ This module requires a valid ~GOPATH~, and the following Go packages:
+ ~gore~ (for the REPL)
+ ~guru~ (for code navigation & refactoring commands)
+ ~goimports~ (optional: for auto-formatting code on save & fixing imports)
+ ~gotests~ (for generate test code)
#+BEGIN_SRC sh
export GOPATH=~/work/go
@ -76,6 +79,7 @@ go get -u golang.org/x/tools/cmd/godoc
go get -u golang.org/x/tools/cmd/goimports
go get -u golang.org/x/tools/cmd/gorename
go get -u golang.org/x/tools/cmd/guru
go get -u github.com/cweill/gotests/...
#+END_SRC
* TODO Features

View file

@ -51,7 +51,10 @@
"t" #'+go/test-rerun
"a" #'+go/test-all
"s" #'+go/test-single
"n" #'+go/test-nested)))
"n" #'+go/test-nested
"g" #'go-gen-test-dwim
"G" #'go-gen-test-all
"e" #'go-gen-test-exported)))
(use-package! gorepl-mode

View file

@ -11,6 +11,9 @@
(unless (executable-find "gore")
(warn! "Couldn't find gore. REPL will not work"))
(unless (executable-find "gotests")
(warn! "Couldn't find gotests. Generating tests will not work"))
(when (featurep! :completion company)
(require 'company-go)
(unless (executable-find company-go-gocode-command)

View file

@ -6,6 +6,7 @@
(package! go-mode)
(package! gorepl-mode)
(package! go-add-tags)
(package! go-gen-test)
(when (featurep! :completion company)
(package! company-go))