How to print text to console when testing in Go (testing package)?
Hi everyone! I just started learning Go and I'm writing unit tests using the standard `testing` package. I have a simple function that I want to test, and for debugging I need to output some intermediate values to the console to make sure the test is working correctly.
Here's an example of my code:
```go
package main
import "testing"
func Sum(a, b int) int {
return a + b
}
func TestSum(t *testing.T) {
result := Sum(2, 3)
// How do I output result to the console?
}
```
I tried using `fmt.Println(result)` inside the `TestSum` function, but when running the test with `go test`, I don't see any output. Maybe I'm doing something wrong? Do I need to use some special method from the `testing` package?
Please advise on the correct way.