Skip to content

Commit

Permalink
chore: remove incorrect comments from examples
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <kzantow@gmail.com>
  • Loading branch information
kzantow committed Jan 17, 2023
1 parent e762e0b commit 3239f49
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions examples/1-load/example_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX tag-value file <spdx-file-in>, and\n")
fmt.Printf(" print a portion of its contents.\n")
return
}
Expand All @@ -36,7 +36,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a tag-value file, version 2.2
// try to load the SPDX file's contents as a tag-value file
doc, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", filename, err)
Expand Down
4 changes: 2 additions & 2 deletions examples/10-jsonloader/example_json_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 2 {
fmt.Printf("Usage: %v <json-file-in>\n", args[0])
fmt.Printf(" Load SPDX 2.2 JSON file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX JSON file <spdx-file-in>, and\n")
fmt.Printf(" print portions of its creation info data.\n")
return
}
Expand All @@ -35,7 +35,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a json file, version 2.2
// try to load the SPDX file's contents as a json file
doc, err := json.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", args[1], err)
Expand Down
2 changes: 1 addition & 1 deletion examples/11-yamltotv/exampleyamltotv.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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 tag-value file
err = tagvalue.Write(doc, w)
if err != nil {
fmt.Printf("Error while saving %v: %v", fileOut, err)
Expand Down
2 changes: 1 addition & 1 deletion examples/12-tvtoyaml/exampletvtoyaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 3 {
fmt.Printf("Usage: %v <spdx-file-in> <yaml-file-out>\n", args[0])
fmt.Printf(" Load SPDX 2.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX tag-value file <spdx-file-in>, and\n")
fmt.Printf(" save it out to <yaml-file-out>.\n")
return
}
Expand Down
4 changes: 2 additions & 2 deletions examples/13-yamlloader/exampleYAMLLoader.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 2 {
fmt.Printf("Usage: %v <json-file-in>\n", args[0])
fmt.Printf(" Load SPDX 2.2 JSON file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX JSON file <spdx-file-in>, and\n")
fmt.Printf(" print portions of its creation info data.\n")
return
}
Expand All @@ -35,7 +35,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a json file, version 2.2
// try to load the SPDX file's contents as a json file
doc, err := yaml.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", args[1], err)
Expand Down
6 changes: 3 additions & 3 deletions examples/2-load-save/example_load_save.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX tag-value file <spdx-file-in>, and\n")
fmt.Printf(" save it out to <spdx-file-out>.\n")
return
}
Expand All @@ -35,7 +35,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a tag-value file, version 2.2
// try to load the SPDX file's contents as a tag-value file
doc, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", fileIn, err)
Expand All @@ -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 tag-value file
err = tagvalue.Write(doc, w)
if err != nil {
fmt.Printf("Error while saving %v: %v", fileOut, err)
Expand Down
2 changes: 1 addition & 1 deletion examples/3-build/example_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
args := os.Args
if len(args) != 4 {
fmt.Printf("Usage: %v <package-name> <package-root-dir> <spdx-file-out>\n", args[0])
fmt.Printf(" Build a SPDX 2.2 document with one package called <package-name>;\n")
fmt.Printf(" Build a SPDX document with one package called <package-name>;\n")
fmt.Printf(" create files with hashes corresponding to the files in <package-root-dir>;\n")
fmt.Printf(" and save it out as a tag-value file to <spdx-file-out>.\n")
return
Expand Down
2 changes: 1 addition & 1 deletion examples/4-search/example_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func main() {
args := os.Args
if len(args) != 4 {
fmt.Printf("Usage: %v <package-name> <package-root-dir> <spdx-file-out>\n", args[0])
fmt.Printf(" Build a SPDX 2.2 document with one package called <package-name>;\n")
fmt.Printf(" Build a SPDX document with one package called <package-name>;\n")
fmt.Printf(" create files with hashes corresponding to the files in <package-root-dir>;\n")
fmt.Printf(" search for SPDX short-form IDs, and use them to fill in license data\n")
fmt.Printf(" where possible; and save it out as a tag-value file to <spdx-file-out>.\n")
Expand Down
4 changes: 2 additions & 2 deletions examples/5-report/example_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX tag-value file <spdx-file-in>, and\n")
fmt.Printf(" generate and print a report of its concluded licenses.\n")
return
}
Expand All @@ -37,7 +37,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a tag-value file, version 2.2
// try to load the SPDX file's contents as a tag-value file
doc, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", filename, err)
Expand Down
6 changes: 3 additions & 3 deletions examples/6-licensediff/example_licensediff.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
args := os.Args
if len(args) != 3 {
fmt.Printf("Usage: %v <spdx-file-first> <spdx-file-second>\n", args[0])
fmt.Printf(" Load SPDX 2.2 tag-value files <spdx-file-first> and <spdx-file-second>,\n")
fmt.Printf(" Load SPDX tag-value files <spdx-file-first> and <spdx-file-second>,\n")
fmt.Printf(" run a diff between their concluded licenses, and print basic results.\n")
return
}
Expand All @@ -41,7 +41,7 @@ func main() {
}
defer r.Close()

// try to load the first SPDX file's contents as a tag-value file, version 2.2
// try to load the first SPDX file's contents as a tag-value file
docFirst, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", filenameFirst, err)
Expand All @@ -66,7 +66,7 @@ func main() {
}
defer r.Close()

// try to load the second SPDX file's contents as a tag-value file, version 2.2
// try to load the second SPDX file's contents as a tag-value file
docSecond, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", filenameSecond, err)
Expand Down
4 changes: 2 additions & 2 deletions examples/8-jsontotv/examplejsontotv.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a json file, version 2.2
// try to load the SPDX file's contents as a json file
doc, err := json.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", args[1], err)
Expand All @@ -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 tag-value file
err = tagvalue.Write(doc, w)
if err != nil {
fmt.Printf("Error while saving %v: %v", fileOut, err)
Expand Down
4 changes: 2 additions & 2 deletions examples/9-tvtojson/exampletvtojson.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
args := os.Args
if len(args) != 3 {
fmt.Printf("Usage: %v <spdx-file-in> <json-file-out>\n", args[0])
fmt.Printf(" Load SPDX 2.2 tag-value file <spdx-file-in>, and\n")
fmt.Printf(" Load SPDX tag-value file <spdx-file-in>, and\n")
fmt.Printf(" save it out to JSON <json-file-out>.\n")
return
}
Expand All @@ -35,7 +35,7 @@ func main() {
}
defer r.Close()

// try to load the SPDX file's contents as a tag-value file, version 2.2
// try to load the SPDX file's contents as a tag-value file
doc, err := tagvalue.Read(r)
if err != nil {
fmt.Printf("Error while parsing %v: %v", args[1], err)
Expand Down

0 comments on commit 3239f49

Please sign in to comment.