golang-project-layout

Structure Golang projects with architecture, dependency injection, and 12-Factor App principles.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/LuigiAPCPereira/evolutiondocs --skill golang-project-layout-luigiapcpereira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-project-layout
Source: https://github.com/LuigiAPCPereira/evolutiondocs/tree/main/.agents/skills/golang-project-layout
Command: npx skills add https://github.com/LuigiAPCPereira/evolutiondocs --skill golang-project-layout-luigiapcpereira

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you efficiently set up and organize your Golang projects, ensuring a structured and maintainable codebase.

Core Features & Use Cases

  • Project Architecture: Guidance on choosing the right software architecture for your project.
  • Dependency Injection: Decisions on dependency injection methods tailored to your project needs.
  • 12-Factor App: Follow best practices for building cloud-native applications.
  • Project Types: Guidance for CLI tools, libraries, services, monorepos, and workspaces.
  • Module Naming: Best practices for naming Go modules and packages.
  • Directory Layout: Recommendations for a clean and efficient directory structure.
  • Configuration Files: Essential configuration files for Go projects.
  • Testing and Benchmarking: Best practices for organizing tests and benchmarks.
  • Go Workspaces: Using Go workspaces for managing multi-module projects.

Quick Start

Run the skill and follow the guidance to set up your Golang project with the recommended architecture and structure.

Frequently Asked Questions about golang-project-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Golang project for cloud-native applications?

Structure your Golang project using 12-Factor App principles for cloud-native deployment. This approach provides directory layout guidelines, configuration file setup, and module naming conventions to ensure a maintainable and scalable codebase.

What is the best way to set up dependency injection in a Go project?

The best way to set up dependency injection in Go depends on your specific project type, like CLI tools or services. Tailored guidance helps select appropriate injection methods matching your architecture, ensuring efficient code organization and testability.

How do I organize a Golang monorepo or multi-module workspace?

Organize a Golang monorepo or multi-module workspace using Go workspaces. This provides specific directory layout recommendations and module naming conventions to cleanly manage multiple modules within a single structured codebase.

Does this Golang project setup guidance support libraries and CLI tools?

Yes, this Golang project setup guidance supports various project types including CLI tools, libraries, services, and monorepos. It delivers tailored directory layouts and configuration file recommendations for each specific project context.

Where should I put tests and benchmarks in a Golang directory layout?

Tests and benchmarks in a Golang directory layout should follow established best practices for organization. This ensures your project structure remains clean and efficient while maintaining codebase maintainability throughout the development lifecycle.