News for hackers. Stuff that matters.
Re:Practical Go: Real-world advice for writing maintainable ... by fwip on Thursday February 21, 2019 @12:54PM (#19218898)
You should put the docs for AuthProvider on AuthProvider, not on Auth or AuthDefault.
Re:Practical Go: Real-world advice for writing maintainable ... by letientai299 on Thursday February 21, 2019 @08:44PM (#19222388)
You didn't get my point. Of course the doc should be long to where it should. In this case, I want the doc for my base function is easier to be discovered from the helper functions.
Re:Practical Go: Real-world advice for writing maintainable ... by fwip on Friday February 22, 2019 @12:19AM (#19223310)
The docs for Auth() will be right next to the docs for AuthWithDefaultProvider(). Like, right above one another.
Re:Practical Go: Real-world advice for writing maintainable ... by shhsshs on Thursday February 21, 2019 @08:21PM (#19222287)
I agree. If the documentation seems duplicated, chances are the code is too. Worded oppositely, if the code is duplicated, chances are the documentation is duplicated or repetitive. Both the documentation and the main logic it describes should live in one place.