fmt.Sprint(e)에서 e가 string이 아니고 errors면 무한루프를 돔. 왜?
fmt.Sprint(e) 코드가 대략 아래처럼 생격다고 함.
Stringer면 출력을 하는데 error면....
switch verb {
case 'v', 's', 'x', 'X', 'q':
// Is it an error or Stringer?
// The duplication in the bodies is necessary:
// setting handled and deferring catchPanic
// must happen before calling the method.
switch v := p.arg.(type) {
case error:
handled = true
defer p.catchPanic(p.arg, verb, "Error")
p.fmtString(v.Error(), verb)
return
case Stringer:
handled = true
defer p.catchPanic(p.arg, verb, "String")
p.fmtString(v.String(), verb)
return
}
}
어쨌든 String으로 변환해서 출력해야한다고 함