# project-layout | golang-standards | Knowledge Base | Instagit

Standard Go Project Layout

GitHub Stars: 55.5k

Repository: https://github.com/golang-standards/project-layout

---

## Articles

### [Go Project Structure for Microservices Architecture: The Complete golang-standards/project-layout Guide](/golang-standards/project-layout/go-project-structure-for-microservices-architecture)

Master Go project structure for microservices with golang-standards/project-layout. Learn to organize cmd, internal, pkg, and deployments for maintainable Go applications. Enhance your architecture today.

- Tags: tutorial
- Published: 2026-03-06

### [When to Use the `/examples` Directory in Go Projects: A Complete Guide](/golang-standards/project-layout/when-to-use-examples-directory-in-go-projects)

Learn when to use the /examples directory in Go projects for runnable demonstrations, educational content, and integration tests. Understand this project layout convention.

- Tags: best-practices
- Published: 2026-03-06

### [How to Organize Assets and Static Files in Go Web Applications](/golang-standards/project-layout/how-to-organize-assets-and-static-files-in-go-web-applications)

Organize Go web application assets and static files effectively using the golang-standards project layout convention. Streamline your project structure for better maintainability and clarity.

- Tags: how-to-guide
- Published: 2026-03-06

### [Go Project Layout Patterns Used by Popular Go Projects: Standard Structure Explained](/golang-standards/project-layout/go-project-layout-patterns-used-by-popular-go-projects)

Explore Go project layout patterns used by popular projects like Kubernetes. Learn the standard structure for scalable, compiler-enforced architectures with /cmd, /internal, and /pkg.

- Tags: best-practices
- Published: 2026-03-06

### [How to Structure Multi-Binary Go Projects: The Standard Layout Explained](/golang-standards/project-layout/how-to-structure-multi-binary-go-projects)

Structure multi-binary Go projects effectively using the standard layout. Organize code in cmd internal and pkg directories for maintainable entry points.

- Tags: architecture
- Published: 2026-03-06

### [Difference Between /build, /deployments, and /scripts in the Go Project Layout](/golang-standards/project-layout/difference-between-build-deployments-and-scripts-directories)

Understand the Go Project Layout: Learn the distinct roles of /build for distributable artifacts, /deployments for infrastructure-as-code, and /scripts for automation tools. Optimize your Go projects.

- Tags: deep-dive
- Published: 2026-03-06

### [How to Organize Initialization and System Config Files in Go Projects](/golang-standards/project-layout/how-to-organize-initialization-and-system-config-files-in-go)

Organize Go project initialization and system config files effectively. Use init/ for scripts and configs/ for templates to separate deployment from runtime settings.

- Tags: best-practices
- Published: 2026-03-06

### [Go Modules and Dependency Management Best Practices for Production Projects](/golang-standards/project-layout/go-modules-and-dependency-management-best-practices)

Master Go Modules and dependency management for production. Learn best practices for minimal go.mod, committing go.sum, and using vendor directories for reproducible builds.

- Tags: best-practices
- Published: 2026-03-06

### [How to Structure Go Projects with Docker and Kubernetes](/golang-standards/project-layout/how-to-structure-go-projects-with-docker-and-kubernetes)

Structure Go projects effectively with Docker and Kubernetes. Learn to organize your code using golang-standards project layout for cleaner deployments and orchestration.

- Tags: how-to-guide
- Published: 2026-03-06

### [When to Avoid the `/src` Directory in Go Projects: Best Practices Explained](/golang-standards/project-layout/when-to-avoid-src-directory-in-go-projects)

Learn why you should avoid the top-level src directory in Go projects. Discover best practices for cleaner, more efficient Go module organization.

- Tags: best-practices
- Published: 2026-03-06

### [How to Organize Configuration Files in Go Projects: The /configs Directory Standard](/golang-standards/project-layout/how-to-organize-configuration-files-in-go-projects)

Organize Go project configuration files in a /configs directory. Separate operational assets from source code and enable environment-specific customization for better project management.

- Tags: best-practices
- Published: 2026-03-06

### [Best Practices for Go Makefile and Build Scripts: golang-standards/project-layout Guide](/golang-standards/project-layout/best-practices-for-go-makefile-and-build-scripts)

Master Go Makefile and build script best practices with the golang-standards/project-layout guide. Ensure reproducible builds for local dev and CI.

- Tags: best-practices
- Published: 2026-03-06

### [How to Structure Go Projects for Open Source Libraries: The Complete Guide](/golang-standards/project-layout/how-to-structure-go-projects-for-open-source-libraries)

Structure your Go projects for open source libraries like a pro using the golang-standards/project-layout. Learn to organize APIs in pkg internals in internal and cmd for tools. Accelerate your development today.

- Tags: best-practices
- Published: 2026-03-06

### [Go Project Structure for CLI Applications: The Standard Layout Explained](/golang-standards/project-layout/go-project-structure-for-cli-applications)

Master Go project structure for CLI apps. Learn the standard layout with cmd/, internal/, and pkg/ for scalable, testable tools. Build better command-line applications.

- Tags: architecture
- Published: 2026-03-06

### [How to Organize Test Files and Test Data in Go: Best Practices from project-layout](/golang-standards/project-layout/how-to-organize-test-files-and-test-data-in-go)

Learn to organize Go test files and test data effectively. Discover best practices from golang-standards/project-layout for clean separation and efficient testing.

- Tags: best-practices
- Published: 2026-03-06

### [Understanding Go's Internal Package Protection Mechanism](/golang-standards/project-layout/understanding-go-internal-package-protection-mechanism)

Learn Go's compile-time internal package protection mechanism. Restrict imports to your module and parent directory for better code organization.

- Tags: internals
- Published: 2026-03-06

### [How to Use the /cmd Directory for Main Applications in Go Projects](/golang-standards/project-layout/how-to-use-cmd-directory-for-main-applications)

Learn to use the cmd directory for main Go applications with the golang-standards/project-layout. Structure executables for clean code and efficient development.

- Tags: how-to-guide
- Published: 2026-03-06

### [Best Practices for Organizing Go Package Imports: A Complete Guide](/golang-standards/project-layout/best-practices-for-organizing-go-package-imports)

Master Go package import organization. Group standard library, third-party, and internal packages alphabetically for cleaner code and fewer merge conflicts.

- Tags: best-practices
- Published: 2026-03-06

### [Go Vendor Directory vs Go Modules: When to Use Each in Your Project](/golang-standards/project-layout/go-vendor-directory-vs-go-modules-when-to-use-each)

Understand Go Modules and vendor directory differences. Use modules for standard dependency management and vendor for air-gapped builds or strict compliance.

- Tags: deep-dive
- Published: 2026-03-06

### [When to Use /internal vs /pkg Directory in Go Projects](/golang-standards/project-layout/when-to-use-internal-vs-pkg-directory-in-go-projects)

Learn when to use /internal for private Go code and /pkg for public libraries. Understand Go's project layout conventions for secure and stable external imports.

- Tags: best-practices
- Published: 2026-03-06

