mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Basic New Relic deploy info
This commit is contained in:
committed by
Chris Cummer
parent
a82db2bea8
commit
6303acc9a4
@@ -67,7 +67,7 @@ func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
|
||||
if len(data.Recipients) == 0 {
|
||||
str = str + " [gray]no one[white]\n"
|
||||
} else {
|
||||
str = str + fmt.Sprintf(" %s\n", strings.Join(widget.namesFromEmails(data.Recipients), ", "))
|
||||
str = str + fmt.Sprintf(" %s\n", strings.Join(wtf.NamesFromEmails(data.Recipients), ", "))
|
||||
}
|
||||
|
||||
str = str + "\n"
|
||||
@@ -79,14 +79,3 @@ func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
|
||||
func (widget *Widget) cleanScheduleName(schedule string) string {
|
||||
return strings.Replace(schedule, "_", " ", -1)
|
||||
}
|
||||
|
||||
func (widget *Widget) namesFromEmails(emails []string) []string {
|
||||
names := []string{}
|
||||
|
||||
for _, email := range emails {
|
||||
parts := strings.Split(email, "@")
|
||||
names = append(names, strings.Title(strings.Replace(parts[0], ".", " ", -1)))
|
||||
}
|
||||
|
||||
return names
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user