mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 03:20:26 +10:00
Updating Doom Emacs.
This commit is contained in:
@@ -41,6 +41,21 @@
|
||||
(+go--run-tests (concat "-run" "='" (match-string-no-properties 2) "'")))
|
||||
(error "Must be in a _test.go file")))
|
||||
|
||||
;;;###autoload
|
||||
(defun +go/bench-all ()
|
||||
(interactive)
|
||||
(+go--run-tests "-test.run=NONE -test.bench=\".*\""))
|
||||
|
||||
;;;###autoload
|
||||
(defun +go/bench-single ()
|
||||
(interactive)
|
||||
(if (string-match "_test\\.go" buffer-file-name)
|
||||
(save-excursion
|
||||
(re-search-backward "^func[ ]+\\(([[:alnum:]]*?[ ]?[*]?[[:alnum:]]+)[ ]+\\)?\\(Benchmark[[:alnum:]_]+\\)(.*)")
|
||||
(+go--run-tests (concat "-test.run=NONE -test.bench" "='" (match-string-no-properties 2) "'")))
|
||||
(error "Must be in a _test.go file")))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
(defun +go/play-buffer-or-region (&optional beg end)
|
||||
"TODO"
|
||||
|
||||
Reference in New Issue
Block a user