Coding Rules
#
importSingle-line import is not recommended being wrapped in parentheses
Introduce in the order of
Official Package
, NEW LINE,Project Package
, NEW LINE,Third Party Dependent Package
#
Function returns- Object avoids non-pointer return
- Follow the principle that if there is a normal value return, there must be no error, and if there is an error, there must be no normal value return.
#
Error handling- An error must be handled, if it cannot be handled, it must be thrown.
- Avoid underscore (_) receiving error
#
Function body codingIt is recommended that a block end with a blank line, such as if, for, etc.
Blank line before return