github.com/cnboonhan/delve@v0.0.0-20230908061759-363f2388c2fb/pkg/locspec/doc.go (about)

     1  // Package locspec implements code to parse a string into a specific
     2  // location specification.
     3  //
     4  // Location spec examples:
     5  //
     6  //	locStr ::= <filename>:<line> | <function>[:<line>] | /<regex>/ | (+|-)<offset> | <line> | *<address>
     7  //
     8  //	* <filename> can be the full path of a file or just a suffix
     9  //	* <function> ::= <package>.<receiver type>.<name> | <package>.(*<receiver type>).<name> | <receiver type>.<name> | <package>.<name> | (*<receiver type>).<name> | <name>
    10  //	  <function> must be unambiguous
    11  //	* /<regex>/ will return a location for each function matched by regex
    12  //	* +<offset> returns a location for the line that is <offset> lines after the current line
    13  //	* -<offset> returns a location for the line that is <offset> lines before the current line
    14  //	* <line> returns a location for a line in the current file
    15  //	* *<address> returns the location corresponding to the specified address
    16  package locspec