Why is it recommended to return with the `error` interface in go rather than with the concrete error type?

前端 未结 0 1346
粉色の甜心
粉色の甜心 2020-12-23 10:53

The go FQA states:

It\'s a good idea for functions that return errors always to use the error type in their signature (as we did above) rather than a con

相关标签:
回答
  • 消灭零回复
提交回复
热议问题