---
name: rel_or_full
kind: function
lang: go
domain: core
version: "1.0.0"
purity: pure
signature: "func RelOrFull(base, target string) string"
description: "Retorna el path de target relativo a base. Si filepath.Rel falla, retorna target sin cambios. Util para mostrar paths cortos en UIs."
tags: [core, path, relative, filepath, display, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: ""
imports: [path/filepath]
params:
  - name: base
    desc: "directorio base para calcular la ruta relativa"
  - name: target
    desc: "path absoluto o relativo a convertir"
output: "path relativo a base, o target original si la conversion falla"
tested: false
tests: []
test_file_path: ""
file_path: "functions/core/rel_or_full.go"
source_repo: "https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git"
source_license: "MIT"
source_file: "launcher/core/script_query.go"
---

## Ejemplo

```go
rel := core.RelOrFull("/home/user/project", "/home/user/project/src/main.go")
// rel == "src/main.go"

full := core.RelOrFull("/home/user", "/other/path")
// full == "../../other/path"
```

## Notas

Wrapper seguro sobre `filepath.Rel` que nunca retorna error. Si los paths estan en volúmenes distintos (Windows), retorna el target original.
