|
|
|
|
|
by insertnickname
2610 days ago
|
|
>Secondly why is this really important functionality in `fmt` and not in `error`? `fmt` already depends on `errors`, and Go does not allow cyclical dependencies, so `errors` would have to reimplement string formatting. |
|
Which already exists incidentally, internal/errinternal was added so errors.New and fmt.Errorf could return the same type.
It does make errors pull the entire formatting machinery, but chances are you're probably using string formatting long before errors so meh…