I'm new in Go and trying to work on a project. The structure of the code is like
handlers/
-time.go
-time_test.go
I've already tried go build, make (project) name
The thing is, I want to add some console output inside the code so that I know if a branch is covered or not (or for debugging). Right now, it doesn't work for me.
If I use:
go test -run test_file_path
If will just output
Pass 0.009s
Even I putt.Log("print log")
or even fmt.Print("Say Hello")
inside the test function.
If I just use go test -v test_file_path
I would have undefined variables. The build & test would fail.
Any suggestions? Thanks!g