blob: 87533a2ac64508cb2a5c953c4b6072e5dab3adb6 (
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 saver2v2
import (
"fmt"
"io"
"github.com/spdx/tools-golang/spdx/v2_2"
)
func renderCreationInfo2_2(ci *v2_2.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
}
|