carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package fixture
2
3import "fmt"
4
5// Not compiled. Both forward an error's text with no sentence of their own:
6// the pattern derives to a bare placeholder, which no row can vouch for.
7
8func viaSprintf(w int, err error) {
9 jsonError(w, 400, fmt.Sprintf("%v", err))
10}
11
12func viaConcat(w int, err error) {
13 jsonError(w, 400, ""+err.Error())
14}
15
16func viaVerbs(w int, err error) {
17 jsonError(w, 400, fmt.Sprintf("%s%s", "", err))
18}
19