aboutsummaryrefslogtreecommitdiff
path: root/examples/2-load-save/example_load_save.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/2-load-save/example_load_save.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/2-load-save/example_load_save.go')
-rw-r--r--examples/2-load-save/example_load_save.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/2-load-save/example_load_save.go b/examples/2-load-save/example_load_save.go
index 39ab501..0abb89c 100644
--- a/examples/2-load-save/example_load_save.go
+++ b/examples/2-load-save/example_load_save.go
@@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 3 {
fmt.Printf("Usage: %v <spdx-file-in> <spdx-file-out>\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(" save it out to <spdx-file-out>.\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", fileIn, err)
return
@@ -56,8 +56,8 @@ func main() {
}
defer w.Close()
- // try to save the document to disk as an SPDX tag-value file, version 2.1
- err = tvsaver.Save2_1(doc, w)
+ // try to save the document to disk as an SPDX tag-value file, version 2.2
+ err = tvsaver.Save2_2(doc, w)
if err != nil {
fmt.Printf("Error while saving %v: %v", fileOut, err)
return