internal package

A package inside a folder called internal, which Go allows only code within the same parent folder tree to import.

In more detail

Put code under internal/ when you want other packages in your module to use it but outside modules to be unable to depend on it. Importing it from another module is a build error. It lets you change that code freely without breaking anyone.

Example

course.local/probe/internal/check

Related terms

Taught in

References