mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 19:00:54 -06:00
15 lines
264 B
Go
15 lines
264 B
Go
|
package util
|
||
|
|
||
|
import "strings"
|
||
|
|
||
|
// SplitEmails splits addresses with a few different ways
|
||
|
func SplitEmails(emails string) []string {
|
||
|
return strings.FieldsFunc(emails, func(r rune) bool {
|
||
|
switch r {
|
||
|
case ',', ';', '\n':
|
||
|
return true
|
||
|
}
|
||
|
return false
|
||
|
})
|
||
|
}
|