From d1b825c0905735029cfa9b4d54057a350fe32d66 Mon Sep 17 00:00:00 2001 From: Steve Winslow Date: Sun, 14 Jun 2020 16:00:56 -0400 Subject: Update examples to 2.2 Signed-off-by: Steve Winslow --- examples/3-build/example_build.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/3-build') diff --git a/examples/3-build/example_build.go b/examples/3-build/example_build.go index 64d6eb0..cc63bb7 100644 --- a/examples/3-build/example_build.go +++ b/examples/3-build/example_build.go @@ -22,7 +22,7 @@ func main() { args := os.Args if len(args) != 4 { fmt.Printf("Usage: %v \n", args[0]) - fmt.Printf(" Build a SPDX 2.1 document with one package called ;\n") + fmt.Printf(" Build a SPDX 2.2 document with one package called ;\n") fmt.Printf(" create files with hashes corresponding to the files in ;\n") fmt.Printf(" and save it out as a tag-value file to .\n") return @@ -34,9 +34,9 @@ func main() { fileOut := args[3] // to use the SPDX builder package, the first step is to define a - // builder.Config2_1 struct. this config data can be reused, in case you + // builder.Config2_2 struct. this config data can be reused, in case you // are building SPDX documents for several directories in sequence. - config := &builder.Config2_1{ + config := &builder.Config2_2{ // NamespacePrefix is a prefix that will be used to populate the // mandatory DocumentNamespace field in the Creation Info section. @@ -86,7 +86,7 @@ func main() { // - what to name the package; and // - where the directory is located on disk; and // - the config object we just defined. - doc, err := builder.Build2_1(packageName, packageRootDir, config) + doc, err := builder.Build2_2(packageName, packageRootDir, config) if err != nil { fmt.Printf("Error while building document: %v\n", err) return @@ -107,7 +107,7 @@ func main() { } defer w.Close() - err = tvsaver.Save2_1(doc, w) + err = tvsaver.Save2_2(doc, w) if err != nil { fmt.Printf("Error while saving %v: %v", fileOut, err) return -- cgit v1.2.3