Files
Tomas Dvorak 355a97bab4 overhaul
2026-04-14 18:04:48 +02:00

14 lines
302 B
Go

package api
import "github.com/gin-gonic/gin"
// firstPathParam returns the first non-empty route param from the provided names.
func firstPathParam(c *gin.Context, names ...string) string {
for _, name := range names {
if value := c.Param(name); value != "" {
return value
}
}
return ""
}