diff options
author | Ujjwal Agarwal <ujjwalcoding012@gmail.com> | 2021-07-16 18:53:15 +0530 |
---|---|---|
committer | Ujjwal Agarwal <ujjwalcoding012@gmail.com> | 2021-07-16 18:53:15 +0530 |
commit | d47d0c27d7a16940dfd7cf1fc8224e3b5a73384e (patch) | |
tree | 1cb5f5a6ec0ab33d382da64928139aac6c39692b /examples | |
parent | 8d5f3f5865832e462838153fc7a384b9e327aa36 (diff) | |
download | spdx-tools-d47d0c27d7a16940dfd7cf1fc8224e3b5a73384e.tar.gz |
Examples : Write description of jsonsaver example in readme
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/9-jsonsaver/exampletvtojson.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/9-jsonsaver/exampletvtojson.go b/examples/9-jsonsaver/exampletvtojson.go index 02501f3..2c6ec7e 100644 --- a/examples/9-jsonsaver/exampletvtojson.go +++ b/examples/9-jsonsaver/exampletvtojson.go @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later -// Example for: *tvloader*, *tvsaver* +// Example for: *tvloader*, *jsonsaver* // This example demonstrates loading an SPDX tag-value file from disk into memory, -// and re-saving it to a different file on disk. +// and re-saving it to a different json file on disk. package main @@ -45,7 +45,7 @@ func main() { // if we got here, the file is now loaded into memory. fmt.Printf("Successfully loaded %s\n", args[1]) - // we can now save it back to disk, using tvsaver. + // we can now save it back to disk, using jsonsaver. // create a new file for writing fileOut := args[2] @@ -56,7 +56,7 @@ func main() { } defer w.Close() - // try to save the document to disk as an SPDX tag-value file, version 2.2 + // try to save the document to disk as an SPDX json file, version 2.2 err = jsonsaver.Save2_2(doc, w) if err != nil { fmt.Printf("Error while saving %v: %v", fileOut, err) |