We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f92a2 commit ec8c5d4Copy full SHA for ec8c5d4
handlers/help/help.go
@@ -94,7 +94,7 @@ func buildPost(bot *groupbot.Groupbot) rc.GlipCreatePost {
94
attachment.Fields = append(attachment.Fields,
95
rc.GlipMessageAttachmentFieldsInfo{
96
Title: infoURL.Text,
97
- Value: UrlToMarkdownLinkHostname(infoURL.URL),
+ Value: URLToMarkdownLinkHostname(infoURL.URL),
98
Style: "Short",
99
})
100
}
@@ -136,7 +136,7 @@ func buildPost(bot *groupbot.Groupbot) rc.GlipCreatePost {
136
return reqBody
137
138
139
-func UrlToMarkdownLinkHostname(url string) string {
+func URLToMarkdownLinkHostname(url string) string {
140
rx := regexp.MustCompile(`(?i)^https?://([^/]+)(/[^/])`)
141
m := rx.FindStringSubmatch(url)
142
if len(m) > 1 {
0 commit comments