irby / passwordless-authenticator-poc

Use %q to quote a string in fmt.Sprintf format specifiers GO-R4002
Anti-pattern
Minor
a year ago2 years old
use %q instead of "%s" for quoted strings
644
645	e := echo.New()
646
647	body := fmt.Sprintf(`{"userId": "%s"}`, userId.String())648	req := httptest.NewRequest(http.MethodPost, "/logins", strings.NewReader(body))
649	req.Header.Set("Content-Type", "application/json")
650	rec := httptest.NewRecorder()