3 ms·
Yeah, I went a bit overboard with this style in my first go package as well (http://github.com/melvinmt/gt http://github.com/melvinmt/gt) but now I just follow
by melvinmt 13y ago
Yeah, I went a bit overboard with this style in my first go package as well (http://github.com/melvinmt/gt http://github.com/melvinmt/gt) but now I just follow the convention that only variables that are defined in the function signature should have a single letter. Because due to the explicit type hinting, if you use elaborate variable names, you often end up with redundant naming like:
database *Database.
So
db *Database
looks a bit nicer in my opinion while it's still very clear what it is.