aboutsummaryrefslogtreecommitdiff
path: root/examples/1-load/example_load.go
diff options
context:
space:
mode:
authorSteve Winslow <steve@swinslow.net>2020-06-14 16:00:56 -0400
committerSteve Winslow <steve@swinslow.net>2020-06-14 16:00:56 -0400
commitd1b825c0905735029cfa9b4d54057a350fe32d66 (patch)
tree6b398993765df4934fe21997a13a23f6150cd136 /examples/1-load/example_load.go
parent1e75edca9522aa82d1f269929d907209f93b3575 (diff)
downloadspdx-tools-d1b825c0905735029cfa9b4d54057a350fe32d66.tar.gz
Update examples to 2.2
Signed-off-by: Steve Winslow <steve@swinslow.net>
Diffstat (limited to 'examples/1-load/example_load.go')
-rw-r--r--examples/1-load/example_load.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/1-load/example_load.go b/examples/1-load/example_load.go
index e2af1ac..2ad0a0b 100644
--- a/examples/1-load/example_load.go
+++ b/examples/1-load/example_load.go
@@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 2 {
fmt.Printf("Usage: %v <spdx-file-in>\n", args[0])
- fmt.Printf(" Load SPDX 2.1 tag-value file <spdx-file-in>, and\n")
+ fmt.Printf(" Load SPDX 2.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" print a portion of its contents.\n")
return
}
@@ -35,8 +35,8 @@ func main() {
}
defer r.Close()
- // try to load the SPDX file's contents as a tag-value file, version 2.1
- doc, err := tvloader.Load2_1(r)
+ // try to load the SPDX file's contents as a tag-value file, version 2.2
+ doc, err := tvloader.Load2_2(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", filename, err)
return
@@ -55,7 +55,7 @@ func main() {
fmt.Printf("%#v\n\n", doc.CreationInfo)
// check whether the SPDX file has at least one package that it describes
- pkgIDs, err := spdxlib.GetDescribedPackageIDs2_1(doc)
+ pkgIDs, err := spdxlib.GetDescribedPackageIDs2_2(doc)
if err != nil {
fmt.Printf("Unable to get describe packages from SPDX document: %v\n", err)
return