Thomas Maier 2020-01-05 15:09:36 +01:00
rodzic 8ec6f82ae6
commit 8024037666
2 zmienionych plików z 32 dodań i 33 usunięć

Wyświetl plik

@ -11,7 +11,7 @@ type Response struct {
Code int
}
func errorResponse() (Response) {
func errorResponse() Response {
return Response{"", http.StatusInternalServerError}
}
@ -98,7 +98,7 @@ type SlackAttachment struct {
Text string `json:"text"`
}
func nonemptyAppendNewline(message string) (string) {
func nonemptyAppendNewline(message string) string {
if len(message) == 0 {
return message
}
@ -136,6 +136,5 @@ func slackParserFunc(r *http.Request) (string, error, Response) {
message += attachment.Text
}
return message, nil, Response{"ok", http.StatusOK}
}