chaos-client
chaos-client copied to clipboard
Chaos as a library documentation involves use of internal package
Chaos library version: 0.5.2
Current Behavior:
The sample code for using chaos as a library imports the internal/runner package, which can only be accessed from parents of this package due to the internal prefix. This causes an error when trying to use chaos as a library:
main.go:6:2: use of internal package github.com/projectdiscovery/chaos-client/internal/runner not allowed
Expected Behavior:
The runner package should not be internal, or the documentation should provide a way to run chaos as a library that avoids this error.
Steps To Reproduce:
- Create a new directory and copy the sample code to
main.go. - Initialise a go module in the director (
go mod init a.com/test) and fetch dependencies (go mod tidy). - Run the sample code (
go run main.go).
Anything else:
https://www.bytesizego.com/blog/golang-internal-package
I’ll work on a fix for this issue.