webhookd/pkg/helper/values.go
2023-10-03 20:57:24 +00:00

15 lines
230 B
Go

package helper
import (
"net/url"
"strings"
)
// GetValueOrAlt get value or alt
func GetValueOrAlt(values url.Values, key, alt string) string {
if val, ok := values[key]; ok {
return strings.Join(val, ",")
}
return alt
}