| // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| "github.com/spdx/tools-golang/spdx/v2_2" |
| "github.com/spdx/tools-golang/spdx/v2_3" |
| // Load2_2 takes in an io.Reader and returns an SPDX document. |
| func Load2_2(content io.Reader) (*v2_2.Document, error) { |
| // convert io.Reader to a slice of bytes and call the parser |
| _, err := buf.ReadFrom(content) |
| err = json.Unmarshal(buf.Bytes(), &doc) |
| // Load2_3 takes in an io.Reader and returns an SPDX document. |
| func Load2_3(content io.Reader) (*v2_3.Document, error) { |
| // convert io.Reader to a slice of bytes and call the parser |
| _, err := buf.ReadFrom(content) |
| err = json.Unmarshal(buf.Bytes(), &doc) |