aboutsummaryrefslogtreecommitdiff
path: root/report.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-15 01:00:59 +0700
committerShulhan <ms@kilabit.info>2026-01-15 01:00:59 +0700
commit56f2fb3751f73ec7bc04f19a7bb36587340de298 (patch)
tree8d0a5d74d0e59e918eea51fd009a688f9b57dced /report.go
parent8da1336917c763da16bc6466928c796f269548e8 (diff)
downloadspdxconv-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.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/report.go b/report.go
index b33149a..df77fa6 100644
--- a/report.go
+++ b/report.go
@@ -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
}