Skip to main content

receiver_method_matches

Function receiver_method_matches 

Source
pub fn receiver_method_matches(
    symbol_name: &str,
    receiver: &str,
    method: &str,
) -> bool
Expand description

Check if a gopls document symbol name matches a Receiver.Method query.

gopls returns Go receiver methods as flat document symbol entries with names like (*Handler).CreateSession (pointer receiver) or (Handler).CreateSession (value receiver) — NOT as children of the struct.

Returns true when the symbol’s receiver type (with * stripped) equals receiver and base_name(symbol_name) equals method.