Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FunctionName ¶
func IsFunction ¶
func IsStructMethod ¶
IsStructMethod checks if the provided value is a method expression (e.g., (*Type).Method or Type.Method). It distinguishes between method expressions and regular functions that take struct parameters.
A method expression is created by qualifying a method with a type name, like (*T).Method or T.Method. This is different from: - Regular functions that take struct parameters - Method values (like t.Method where t is an instance) - Anonymous functions
The function works by: 1. Verifying the input is a function with at least one parameter 2. Checking that the first parameter is a struct type (or pointer to struct) 3. Using regex to identify method expressions and extract the type name 4. Comparing the extracted type name with the actual struct type
Types ¶
This section is empty.