-1

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.

user1424739
  • 11,937
  • 17
  • 63
  • 152

1 Answers1

1

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?

No there is not.

(At least no official standard tooling and asking for thirdparty libraries or software is OT on SO.)

Volker
  • 40,468
  • 7
  • 81
  • 87