--- name: init_go_project kind: pipeline lang: bash domain: pipelines version: "1.0.0" purity: impure signature: "init_go_project([module_path: string]) -> void" description: "Pipeline que inicializa un repositorio Go completo con estructura profesional: cmd/app, internal/config, internal/service (con tests), pkg/version, scripts (run/test/build/build-all/lint), Makefile, .gitignore, README y git init con git add." tags: [bash, go, project, init, scaffold, professional, launcher] uses_functions: [install_go_bash_infra, assert_command_exists_bash_shell, create_project_structure_bash_shell] uses_types: [] returns: [] returns_optional: false error_type: "error_go_core" imports: [] params: - name: module_path desc: "path del módulo Go, ej: github.com/org/myproject (default: github.com//)" output: "crea estructura completa en el directorio actual y muestra progreso; exit code 1 si Go o git no están disponibles" tested: false tests: [] test_file_path: "" file_path: "bash/functions/pipelines/init_go_project.sh" source_repo: "https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git" source_license: "MIT" source_file: "scripts/linux/inicializar_repos/go/init_go_proyect.sh" --- ## Ejemplo ```bash mkdir mi-proyecto && cd mi-proyecto # Con module_path automático bash bash/functions/pipelines/init_go_project.sh # Con module_path explícito bash bash/functions/pipelines/init_go_project.sh github.com/miorg/mi-proyecto # Ejecutar y testear tras crear ./scripts/run.sh ./scripts/test.sh make build-all ``` ## Notas Genera una arquitectura funcional con separación clara: cmd/ (entrypoint), internal/ (lógica privada), pkg/ (librería pública). Incluye un test de ejemplo en internal/service/. Ejecuta go mod tidy y git init + git add al final. Para módulos simples sin estructura, usar `init_go_module`.