MCPcopy Index your code
hub / github.com/maruel/panicparse / parseFunc

Function parseFunc

stack/context.go:819–836  ·  view source on GitHub ↗

parseFunc only return an error if it also returns true. Uses reFunc.

(c *Call, line []byte)

Source from the content-addressed store, hash-verified

817//
818// Uses reFunc.
819func parseFunc(c *Call, line []byte) (bool, error) {
820 if match := reFunc.FindSubmatch(line); match != nil {
821 if err := c.Func.Init(string(match[1])); err != nil {
822 return true, err
823 }
824 // It is also done in c.init() but do it here in case of a corrupted trace
825 // for the file section.
826 c.ImportPath = c.Func.ImportPath
827
828 args, err := parseArgs(match[2])
829 if err != nil {
830 return true, fmt.Errorf("%s on line: %q", err, bytes.TrimSpace(line))
831 }
832 c.Args = args
833 return true, nil
834 }
835 return false, nil
836}
837
838// parseArgs parses a collection of comma-separated arguments into an Args
839// struct.

Callers 1

scanMethod · 0.85

Calls 2

parseArgsFunction · 0.85
InitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…