Files
fn_registry/functions/core/compare_versions.md
T
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

1.1 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
compare_versions function go core 1.0.0 pure func CompareVersions(a, b string) int Compara dos strings de version semantica (semver). Soporta formato con o sin prefijo 'v'. Retorna -1, 0 o 1.
core
version
semver
compare
parse
pendiente-usar
false
strconv
strings
name desc
a primera version (ej: 'v1.4.0' o '1.4.0')
name desc
b segunda version
-1 si a < b, 0 si iguales, 1 si a > b false
functions/core/compare_versions.go https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git MIT installer/core/version.go

Ejemplo

core.CompareVersions("v1.4.0", "v1.3.9")  // 1
core.CompareVersions("1.0.0", "1.0.0")    // 0
core.CompareVersions("v0.9.0", "v1.0.0")  // -1

Notas

Compara major.minor.patch como enteros. Ignora pre-release tags y metadata (solo los 3 numeros). Partes faltantes se tratan como 0.