Parse parses a profile and checks for its validity. The input may be a gzip-compressed encoded protobuf or one of many legacy profile formats which may be unsupported in the future.
(r io.Reader)
| 170 | // may be a gzip-compressed encoded protobuf or one of many legacy |
| 171 | // profile formats which may be unsupported in the future. |
| 172 | func Parse(r io.Reader) (*Profile, error) { |
| 173 | data, err := io.ReadAll(r) |
| 174 | if err != nil { |
| 175 | return nil, err |
| 176 | } |
| 177 | return ParseData(data) |
| 178 | } |
| 179 | |
| 180 | // ParseData parses a profile from a buffer and checks for its |
| 181 | // validity. |
searching dependent graphs…