gommon
gommon copied to clipboard
[doc] Style guide for library and application written in Go
Since we are having more contributors (@xplorld, it's better to come up with a strict standard of how to develop and use Go library within dyweb), this would also reduce the cost for code review (if any). In the future we can even enforce those style using static analysis #75
For now, it's just my style based on current gommon code and stuff I read from blog.
It will have three parts
- [x] general, applies all types of Go project, library (like gommon, go.ice), application (like Ayi)
- [ ] library, have more restriction since it will be imported by many applications
- [ ] application, how to organize code by 'business logic', though most 'business' we have in dyweb are command line util and 'cloud native' instead of shopping cart ....
@gaocegege I will put the draft in #96 because error handling is also important part of style and I can take the chance of writing the style guide to revisit existing code in gommon