eddycjy / go-gin-example

An example of gin
MIT License
6.84k stars 1.59k forks source link

自定义http返回码的用意 ? #125

Closed puppetninja closed 3 years ago

puppetninja commented 3 years ago

你好我想请问下http自定义返回码的用意 https://github.com/eddycjy/go-gin-example/blob/master/pkg/e/code.go#L8-L36 比如

ERROR_NOT_EXIST_TAG   = 10003

为什么是10003而不是404呢?