diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-15 01:00:59 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-15 01:00:59 +0700 |
| commit | 56f2fb3751f73ec7bc04f19a7bb36587340de298 (patch) | |
| tree | 8d0a5d74d0e59e918eea51fd009a688f9b57dced /report.go | |
| parent | 8da1336917c763da16bc6466928c796f269548e8 (diff) | |
| download | spdxconv-56f2fb3751f73ec7bc04f19a7bb36587340de298.tar.xz | |
file: change the flag for grouping to use int instead of bool
Previously, we use two boolean fields to flag a file as binary and
unknown.
In order to simplify it in the future we change it to int.
Diffstat (limited to 'report.go')
| -rw-r--r-- | report.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -93,10 +93,10 @@ func loadReport() (rep *report, err error) { case reportGroupRegular: rep.listRegular = append(rep.listRegular, f) case reportGroupBinary: - f.isBinary = true + f.group = groupBinary rep.listBinary = append(rep.listBinary, f) case reportGroupUnknown: - f.isUnknown = true + f.group = groupUnknown rep.listUnknown = append(rep.listUnknown, f) } next: @@ -119,18 +119,18 @@ func (rep *report) scan(conv *SPDXConv, listFile []string) (err error) { if err != nil { return fmt.Errorf(`%s: %w`, logp, err) } - if f.isBinary { + if f.group == groupBinary { rep.listBinary = append(rep.listBinary, f) continue } f.scan(conv) - if f.isBinary { + if f.group == groupBinary { // json file should be detected as binary, since its // does not have comment syntax. rep.listBinary = append(rep.listBinary, f) continue } - if f.isUnknown { + if f.group == groupUnknown { rep.listUnknown = append(rep.listUnknown, f) continue } |
