Skip to content

Chaos as a library documentation involves use of internal package #472

Description

@DanielIntruder

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:

  1. Create a new directory and copy the sample code to main.go.
  2. Initialise a go module in the director (go mod init a.com/test) and fetch dependencies (go mod tidy).
  3. Run the sample code (go run main.go).

Anything else:

https://www.bytesizego.com/blog/golang-internal-package

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions