Skip to content

[Documentation]: The docs don't always prepend the package to types #2180

@Minivera

Description

@Minivera

Proposal

In the docs, many pages have code example you can copy, but those examples don't always contain the package that contains the structs used in the example as a prefix, this is the case for the Dockerfile docs, parts of the networking docs, and the files and mounts docs, to name a few.

This makes this code not directly usable when a user wants to try things out by first copy/pasting the example, then modifying once they see what happens. It's a minor thing, but testcontainers. needs to be prefixed to every struct every time they copy something, which can lead to errors if they forget to do so.

It'd be great if the docs could include these prefix on all structs, or possibly have the examples in context as a separate tab in the code blocks, so we can see the code used in a real test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions