You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we need testing utilities that can be shared across packages. For example, see the SeedPRNG function.
Ideally, we'd be able to place such utilities in a _test.go file so they are not compiled into the production binary. However, this is not possible in golang.
The next best option seems to be using an internal package. To this end, we now have a beats/libbeat/internal folder. Any code that should be usable by packages rooted at beats/libbeat but not by packages outside it should go in here. This includes test helpers/utilities such as the aforementioned SeedPRNG function.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sometimes we need testing utilities that can be shared across packages. For example, see the
SeedPRNG
function.Ideally, we'd be able to place such utilities in a
_test.go
file so they are not compiled into the production binary. However, this is not possible in golang.The next best option seems to be using an internal package. To this end, we now have a
beats/libbeat/internal
folder. Any code that should be usable by packages rooted atbeats/libbeat
but not by packages outside it should go in here. This includes test helpers/utilities such as the aforementionedSeedPRNG
function.The text was updated successfully, but these errors were encountered: