You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
Generate more appropriate GoDoc for generated interface methods, taking into account the existing docs, if any, and describe the method parameter names.
Why the feature is needed
When generating mocks for a method, for instance database/sql/driver's Conn.Prepare, we get the following GoDoc generated:
// Prepare mocks base method.func (m*MockConn) Prepare(arg0string) (driver.Stmt, error) {
This does not make it as easy to understand what arg0, or any other information from the method we're calling, so IDEs can't easily provide hints to the caller what the parameters are/were called.
(Optional) Proposed solution
This would instead generate the following format, or similar:
// Prepare mocks base method.// Prepare returns a prepared statement, bound to this connection.// Method signature:// (query string) (Stmt, error)func (m*MockConn) Prepare(arg0string) (driver.Stmt, error) {
Not sure if the use of the signature there will make sense, so happy to hear suggestions.
The text was updated successfully, but these errors were encountered:
Requested feature
Generate more appropriate GoDoc for generated interface methods, taking into account the existing docs, if any, and describe the method parameter names.
Why the feature is needed
When generating mocks for a method, for instance
database/sql/driver
'sConn.Prepare
, we get the following GoDoc generated:This does not make it as easy to understand what
arg0
, or any other information from the method we're calling, so IDEs can't easily provide hints to the caller what the parameters are/were called.(Optional) Proposed solution
This would instead generate the following format, or similar:
Not sure if the use of the signature there will make sense, so happy to hear suggestions.
The text was updated successfully, but these errors were encountered: