Inspectopedia
 
2024.3

Non-standard signature for well-known function names

Warning
Reliability
New
Last modified: 03 December 2024

Reports methods with certain names in the following cases:

  • the method's name matches the name of several well-known interface methods from the standard library

  • the signature does not match the signature of the corresponding interface method

Such methods might indicate that the receiver type is intended to satisfy an interface from the standard library, but fails to do so because of the mistake in the method's signature.

Example:

The usage is suspicious because it looks like an attempt to implement io.ByteReader but the signature is wrong. More correct version will be as follows: