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:
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(arg0 string) (driver.Stmt, error) {
Not sure if the use of the signature there will make sense, so happy to hear suggestions.
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.