MCPcopy Create free account
hub / github.com/google/gapid / parseLog

Function parseLog

core/git/log.go:71–88  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

69}
70
71func parseLog(str string) ([]ChangeList, error) {
72 msgs := strings.Split(str, "ǁ")
73 cls := make([]ChangeList, 0, len(msgs))
74 for _, s := range msgs {
75 if parts := strings.Split(s, "ǀ"); len(parts) == 4 {
76 cl := ChangeList{
77 Author: strings.TrimSpace(parts[1]),
78 Subject: strings.TrimSpace(parts[2]),
79 Description: strings.TrimSpace(parts[3]),
80 }
81 if err := cl.SHA.Parse(parts[0]); err != nil {
82 return nil, err
83 }
84 cls = append(cls, cl)
85 }
86 }
87 return cls, nil
88}

Callers 3

TestParseLogFunction · 0.85
LogFromMethod · 0.85
ParentMethod · 0.85

Calls 2

ParseMethod · 0.65
SplitMethod · 0.45

Tested by 1

TestParseLogFunction · 0.68