Commit d1a345bb by bergquist

Merge branch 'patch-3' of https://github.com/dakerfp/grafana into dakerfp-patch-3

parents 3d7facf6 2d09dfd3
package util
func StringsFallback2(val1 string, val2 string) string {
if val1 != "" {
return val1
}
return val2
return stringsFallback(val1, val2)
}
func StringsFallback3(val1 string, val2 string, val3 string) string {
if val1 != "" {
return val1
}
if val2 != "" {
return val2
return stringsFallback(val1, val2, val3)
}
func stringsFallback(vals ...string) string {
for _, v := range vals {
if v != "" {
return v
}
}
return val3
return ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment