+4
gitdiff/parser.go
+4
gitdiff/parser.go
···
12
12
// Parse parses a patch with changes to one or more files. Any content before
13
13
// the first file is returned as the second value. If an error occurs while
14
14
// parsing, it returns all files parsed before the error.
15
+
//
16
+
// Parse expects to receive a single patch. If the input may contain multiple
17
+
// patches (for example, if it is an mbox file), callers should split it into
18
+
// individual patches and call Parse on each one.
15
19
func Parse(r io.Reader) ([]*File, string, error) {
16
20
p := newParser(r)
17
21