https://github.com/golang/net/blob/master/icmp/diag_test.go
I see test files like this. I want to run it outside of a go package. Is there a way automatically translate the go file in a form so that it can be run by go run
outside of the package?
EDIT: The answer over Is it possible to call a test Func from another file to start the testing is too convoluted. For this question, the answer is just yes and no. Therefore, it should not be considered a duplicate.