Skip to content

Commit

Permalink
TIL I learned go needs " not '
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryCarlyon committed Sep 24, 2021
1 parent a2cfd24 commit d3c85bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/events/verify/subscription_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ func VerifyWebhookSubscription(p VerifyParameters) (VerifyResponse, error) {
r.IsChallengeValid = false
}

if resp.Header.Get('Content-Type') == 'text/plain' {
color.New().Add(color.FgGreen).Println(fmt.Sprintf(`✔ Valid content-type header. Received type %v`, resp.Header.Get('Content-Type')))
if resp.Header.Get("Content-Type") == "text/plain" {
color.New().Add(color.FgGreen).Println(fmt.Sprintf(`✔ Valid content-type header. Received type %v`, resp.Header.Get("Content-Type")))
} else {
color.New().Add(color.FgRed).Println(fmt.Sprintf(`✗ Invalid content-type header. Received type %v`, resp.Header.Get('Content-Type')))
color.New().Add(color.FgRed).Println(fmt.Sprintf(`✗ Invalid content-type header. Received type %v`, resp.Header.Get("Content-Type")))
}

if resp.StatusCode >= 200 && resp.StatusCode <= 299 {
Expand Down

0 comments on commit d3c85bd

Please sign in to comment.