kopia lustrzana https://github.com/tmsmr/xmpp-webhook
gofmt
rodzic
8ec6f82ae6
commit
8024037666
|
@ -11,7 +11,7 @@ type Response struct {
|
||||||
Code int
|
Code int
|
||||||
}
|
}
|
||||||
|
|
||||||
func errorResponse() (Response) {
|
func errorResponse() Response {
|
||||||
return Response{"", http.StatusInternalServerError}
|
return Response{"", http.StatusInternalServerError}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ type SlackAttachment struct {
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func nonemptyAppendNewline(message string) (string) {
|
func nonemptyAppendNewline(message string) string {
|
||||||
if len(message) == 0 {
|
if len(message) == 0 {
|
||||||
return message
|
return message
|
||||||
}
|
}
|
||||||
|
@ -136,6 +136,5 @@ func slackParserFunc(r *http.Request) (string, error, Response) {
|
||||||
message += attachment.Text
|
message += attachment.Text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return message, nil, Response{"ok", http.StatusOK}
|
return message, nil, Response{"ok", http.StatusOK}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue