blob: eaac9ac29bc9aa0a86ed44bfb92e8f8473a5c856 (
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
31
32
|
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
package saver2v2
import (
"fmt"
"io"
"github.com/spdx/tools-golang/spdx"
)
func renderOtherLicense2_2(ol *spdx.OtherLicense2_2, w io.Writer) error {
if ol.LicenseIdentifier != "" {
fmt.Fprintf(w, "LicenseID: %s\n", ol.LicenseIdentifier)
}
if ol.ExtractedText != "" {
fmt.Fprintf(w, "ExtractedText: %s\n", textify(ol.ExtractedText))
}
if ol.LicenseName != "" {
fmt.Fprintf(w, "LicenseName: %s\n", ol.LicenseName)
}
for _, s := range ol.LicenseCrossReferences {
fmt.Fprintf(w, "LicenseCrossReference: %s\n", s)
}
if ol.LicenseComment != "" {
fmt.Fprintf(w, "LicenseComment: %s\n", textify(ol.LicenseComment))
}
fmt.Fprintf(w, "\n")
return nil
}
|