Dave Cheney 10/6/2019

Use internal packages to reduce your public API surface

Read Original

This article discusses the history of the pkg/ directory in Go and advocates for using the special internal/ directory to create packages that are only importable within a project. It explains how this mechanism helps developers control their public API surface, manage visibility, and avoid creating unwieldy packages, promoting better software design in Go projects.

Use internal packages to reduce your public API surface

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week