Update code style
This commit is contained in:
parent
17e8c1073f
commit
b6f12b7acf
1 changed files with 4 additions and 2 deletions
|
@ -12,9 +12,11 @@
|
||||||
- Always use zerolog for console output. In http handlers,
|
- Always use zerolog for console output. In http handlers,
|
||||||
use `hlog.FromRequest` to get a logger instance prepared with a bunch of metadata
|
use `hlog.FromRequest` to get a logger instance prepared with a bunch of metadata
|
||||||
- As Linstrom is both intended for active use as well as providing a learning resource,
|
- As Linstrom is both intended for active use as well as providing a learning resource,
|
||||||
all functions and structs must be documented
|
all functions and structs must be documented and follow the conventions on [https://tip.golang.org/doc/comment]
|
||||||
- Errors returned from public functions must be wrapped with `git.mstar.dev/mstar/goutils/other.Error`
|
- Errors returned from public functions must either be wrapped with `git.mstar.dev/mstar/goutils/other.Error`
|
||||||
and given appropriate descriptive information
|
and given appropriate descriptive information
|
||||||
|
_or_ return an error defined (as public variable) in that package.
|
||||||
|
Example: `other.Error("auth", "failed to do something important", originalError)`
|
||||||
|
|
||||||
## JS/TS
|
## JS/TS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue