Advanced Go (Golang)
Q94 / 100

What is the difference between go test -count=1 and running tests without it?

Correct! Well done.

Incorrect.

The correct answer is B) -count=1 disables test caching, forcing fresh execution; without it, go test caches results and skips retesting unchanged packages

B

Correct Answer

-count=1 disables test caching, forcing fresh execution; without it, go test caches results and skips retesting unchanged packages

Explanation

go test caches results based on code and test flags. go test -count=1 bypasses this cache, crucial for benchmarks or tests with external state.

Progress
94/100