---
name: docker_volume_list
kind: function
lang: go
domain: infra
version: "1.0.0"
purity: impure
signature: "func DockerVolumeList() ([]map[string]string, error)"
description: "Lista los volumes Docker disponibles localmente. Parsea la salida JSON de docker volume ls. Retorna slice de maps con campos Driver, Name, Scope, Labels, Mountpoint."
tags: [docker, volume, list, infra, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [encoding/json, fmt, os/exec, strings]
params: []
output: "slice de maps con campos Driver, Name, Scope, Labels, Mountpoint de cada volume"
tested: true
tests: ["lista vacia retorna nil sin error", "parsea campos Driver y Name correctamente"]
test_file_path: "functions/infra/docker_volume_list_test.go"
file_path: "functions/infra/docker_volume_list.go"
---

## Ejemplo

```go
volumes, err := DockerVolumeList()
if err != nil {
    log.Fatal(err)
}
for _, v := range volumes {
    fmt.Printf("Volume: %s (driver: %s)\n", v["Name"], v["Driver"])
}
```

## Notas

Ejecuta `docker volume ls --format {{json .}}` (un JSON por linea). Usa splitLines del paquete infra para iterar lineas. Retorna nil si no hay volumes. Los campos del map dependen de la version de Docker pero siempre incluyen Driver y Name.
