boulder/web
Jacob Hoffman-Andrews 4a2029b293
Use explicit fmt.Sprintf for ProblemDetails (#4787)
In #3708, we added formatters for the the convenience methods in the
`probs` package.

However, in #4783, @alexzorin pointed out that we were incorrectly
passing an error message through fmt.Sprintf as the format parameter
rather than as a value parameter.

I proposed a fix in #4784, but during code review we concluded that the
underlying problem was the pattern of using format-style functions that
don't have some variant of printf in the name. That makes this wrong:
`probs.DNS(err.Error())`, and this right: `probs.DNS("%s", err)`. Since
that's an easy mistake to make and a hard one to spot during code review,
we're going to stop using this particular pattern and call `fmt.Sprintf`
directly.

This PR reverts #3708 and adds some `fmt.Sprintf` where needed.
2020-04-21 14:36:11 -07:00
..
context.go Fix nits found by staticcheck (#4726) 2020-03-30 10:20:20 -07:00
context_test.go Change order of "yoda conditions" (1 != foo) (#4756) 2020-04-08 17:19:56 -07:00
docs.go Factor out context.go from wfe and wfe2. (#3086) 2017-09-26 13:54:14 -04:00
jwk.go Support admin. blocking public keys. (#4419) 2019-09-06 16:54:26 -04:00
probs.go Use explicit fmt.Sprintf for ProblemDetails (#4787) 2020-04-21 14:36:11 -07:00
probs_test.go web: support converting suberrors to subproblems. (#4233) 2019-05-28 14:09:02 -04:00
relative.go Remove BaseURL from WFE config. (#3540) 2018-03-09 11:04:02 +00:00
send_error.go Don't double prefix subproblem types (#4686) 2020-02-27 09:43:20 -08:00
send_error_test.go gofmt code with -s (simplify) flag (#4763) 2020-04-08 17:25:35 -07:00