E
E
egorggegor2021-03-31 16:01:28
go
egorggegor, 2021-03-31 16:01:28

Why doesn't it see the race package?

Hello everyone, I'm trying to test my project, but when I type it, I get the go test -v race
following error 60647291cdc90681417428.png

. How can I fix this error?

Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
U
uvelichitel, 2021-03-31
@egorggegor

Probably -race is the same flag
go test -v -race

W
WinPooh32, 2021-03-31
@WinPooh32

If you installed according to the instructions from the site, then delete everything that was stuffed into the system. Then you need to install the compiler through the package manager.
For example, for debian/ubuntu via apt:
sudo apt install golang
Or via snap:

sudo snap install go --channel=1.16/stable --classic

S
sotanodroid, 2021-04-02
@sotanodroid

What are you actually trying to do?
If you want to test something specific, then you need to use: If a specific file: But if you need to run tests with a check for RACE CONDITION, then this is completely different: But you always need to specify what exactly to test, and it will not work to run tests simply by executing `go test` and run tests inside the application, most likely nothing will run.
go test packageName -run NameOfTest
go test foo_test.go
go test -v -race ./...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question