blob: e4b5992c59feded5b98d48391d5e9571e733ee27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
package saver2v1
import (
"fmt"
"io"
"github.com/spdx/tools-golang/spdx/v2_1"
)
func renderCreationInfo2_1(ci *v2_1.CreationInfo, w io.Writer) error {
if ci.LicenseListVersion != "" {
fmt.Fprintf(w, "LicenseListVersion: %s\n", ci.LicenseListVersion)
}
for _, creator := range ci.Creators {
fmt.Fprintf(w, "Creator: %s: %s\n", creator.CreatorType, creator.Creator)
}
if ci.Created != "" {
fmt.Fprintf(w, "Created: %s\n", ci.Created)
}
if ci.CreatorComment != "" {
fmt.Fprintf(w, "CreatorComment: %s\n", textify(ci.CreatorComment))
}
// add blank newline b/c end of a main section
fmt.Fprintf(w, "\n")
return nil
}
|