kopia lustrzana https://github.com/tmsmr/xmpp-webhook
gofmt
rodzic
8ec6f82ae6
commit
8024037666
|
@ -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}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue