mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
19 lines
344 B
Go
19 lines
344 B
Go
package util
|
|
|
|
func StringsFallback2(val1 string, val2 string) string {
|
|
return stringsFallback(val1, val2)
|
|
}
|
|
|
|
func StringsFallback3(val1 string, val2 string, val3 string) string {
|
|
return stringsFallback(val1, val2, val3)
|
|
}
|
|
|
|
func stringsFallback(vals ...string) string {
|
|
for _, v := range vals {
|
|
if v != "" {
|
|
return v
|
|
}
|
|
}
|
|
return ""
|
|
}
|