Merge pull request #1932 from nobv/add-go-gen-test
lang/go: add go-gen-test package
This commit is contained in:
commit
1b3dd6c40d
4 changed files with 12 additions and 1 deletions
|
@ -26,6 +26,7 @@ This module adds [[https://golang.org][Go]] support.
|
||||||
+ Code navigation & refactoring (~go-guru~)
|
+ Code navigation & refactoring (~go-guru~)
|
||||||
+ [[../../editor/file-templates/templates/go-mode][File templates]]
|
+ [[../../editor/file-templates/templates/go-mode][File templates]]
|
||||||
+ [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]]
|
+ [[https://github.com/hlissner/doom-snippets/tree/master/go-mode][Snippets]]
|
||||||
|
+ Generate testing code (~go-gen-test~)
|
||||||
|
|
||||||
** Module Flags
|
** Module Flags
|
||||||
This module provides no 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/manute/gorepl-mode][gorepl-mode]]
|
||||||
+ [[https://github.com/syohex/emacs-go-add-tags][go-add-tags]]
|
+ [[https://github.com/syohex/emacs-go-add-tags][go-add-tags]]
|
||||||
+ [[https://github.com/mdempsky/gocode][company-go]]*
|
+ [[https://github.com/mdempsky/gocode][company-go]]*
|
||||||
|
+ [[https://github.com/s-kostyaev/go-gen-test][go-gen-test]]
|
||||||
|
|
||||||
* Prerequisites
|
* Prerequisites
|
||||||
** Go
|
** Go
|
||||||
|
@ -66,6 +68,7 @@ This module requires a valid ~GOPATH~, and the following Go packages:
|
||||||
+ ~gore~ (for the REPL)
|
+ ~gore~ (for the REPL)
|
||||||
+ ~guru~ (for code navigation & refactoring commands)
|
+ ~guru~ (for code navigation & refactoring commands)
|
||||||
+ ~goimports~ (optional: for auto-formatting code on save & fixing imports)
|
+ ~goimports~ (optional: for auto-formatting code on save & fixing imports)
|
||||||
|
+ ~gotests~ (for generate test code)
|
||||||
|
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
export GOPATH=~/work/go
|
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/goimports
|
||||||
go get -u golang.org/x/tools/cmd/gorename
|
go get -u golang.org/x/tools/cmd/gorename
|
||||||
go get -u golang.org/x/tools/cmd/guru
|
go get -u golang.org/x/tools/cmd/guru
|
||||||
|
go get -u github.com/cweill/gotests/...
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* TODO Features
|
* TODO Features
|
||||||
|
|
|
@ -51,7 +51,10 @@
|
||||||
"t" #'+go/test-rerun
|
"t" #'+go/test-rerun
|
||||||
"a" #'+go/test-all
|
"a" #'+go/test-all
|
||||||
"s" #'+go/test-single
|
"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
|
(use-package! gorepl-mode
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
(unless (executable-find "gore")
|
(unless (executable-find "gore")
|
||||||
(warn! "Couldn't find gore. REPL will not work"))
|
(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)
|
(when (featurep! :completion company)
|
||||||
(require 'company-go)
|
(require 'company-go)
|
||||||
(unless (executable-find company-go-gocode-command)
|
(unless (executable-find company-go-gocode-command)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
(package! go-mode)
|
(package! go-mode)
|
||||||
(package! gorepl-mode)
|
(package! gorepl-mode)
|
||||||
(package! go-add-tags)
|
(package! go-add-tags)
|
||||||
|
(package! go-gen-test)
|
||||||
|
|
||||||
(when (featurep! :completion company)
|
(when (featurep! :completion company)
|
||||||
(package! company-go))
|
(package! company-go))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue