question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run previous Go test

See original GitHub issue

On IntelliJ on macOS, this very useful function is bound to ctrl+r.

In vscode (with the intellij keybinding) ctrl+r is bound to “File: Open Recent”.

Would it be feasible to rebind ctrl+r to Go: Test Previous as part of the intellij keybinding?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
glyncommented, Mar 26, 2020

Excellent, that works fine and is a great solution. Thanks!

1reaction
glyncommented, Mar 25, 2020

Checking the default bindings for IntelliJ, it seems that macOS has “Run” assigned to it. So, I should remap it to “Tasks: Run Task”. Is that okay?

Thanks, that may suit some languages, but it doesn’t help for Go development. “Tasks: Run Task” doesn’t re-run the last Go test, it produces a message “No task to run found. Configure Tasks…”.

(My current workaround is to manually bind ctrl+r to ‘Go: Test Previous’.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run test cases in a specified file? - Stack Overflow
There are two ways. The easy one is to use the -run flag and provide a pattern matching names of the tests you...
Read more >
Testing in Go: go test - Ilija Eftimov ‍
In the local directory mode, go test compiles the package sources and tests found in the current directory and then runs the resulting...
Read more >
How to run a specific test in Go - freshman.tech
Go provides the go test command for running the unit tests in a project. Running this command will ordinarily run the whole test...
Read more >
How to Run a Single Test - GolangCode
This post shows you the command you need to run just your test, as well as a full example below. TL;DR: use -run....
Read more >
Add a test - The Go Programming Language
The go test command executes test functions (whose names begin with Test ) in test files (whose names end with _test.go). You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found