Files
egutierrez c383e6464a feat: add bash pipeline functions for Go project initialization
2 pipelines Bash: init_go_module (inicializa un modulo Go con go mod init y
estructura de directorios estandar) e init_go_project (scaffolding completo
de proyecto Go con cmd/, internal/, configs y Makefile). Componen funciones
shell existentes del registry.
2026-04-12 13:54:30 +02:00

1.8 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path source_repo source_license source_file
init_go_project pipeline bash pipelines 1.0.0 impure init_go_project([module_path: string]) -> void 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.
bash
go
project
init
scaffold
professional
launcher
install_go_bash_infra
assert_command_exists_bash_shell
create_project_structure_bash_shell
false error_go_core
name desc
module_path path del módulo Go, ej: github.com/org/myproject (default: github.com/<whoami>/<dirname>)
crea estructura completa en el directorio actual y muestra progreso; exit code 1 si Go o git no están disponibles false
bash/functions/pipelines/init_go_project.sh https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git MIT scripts/linux/inicializar_repos/go/init_go_proyect.sh

Ejemplo

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.