aboutsummaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-15 21:15:00 +0700
committerShulhan <ms@kilabit.info>2026-01-15 21:23:48 +0700
commitaa7f2df15e91f5c94807247228cf82e18fe03887 (patch)
tree2587dda62755cc69bb785786dd2c80214a23f679 /file.go
parent32e4ea9ddf0c2d37f00fa81a4fb1dfe67420b8fe (diff)
downloadspdxconv-aa7f2df15e91f5c94807247228cf82e18fe03887.tar.xz
all: allow multiple pattern in match-file-comment
This makes the configuration more concise where pattern can be split into multi lines. While at it, add more pattern to match-file-comment.
Diffstat (limited to 'file.go')
-rw-r--r--file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.go b/file.go
index 80c369c..6568137 100644
--- a/file.go
+++ b/file.go
@@ -152,7 +152,7 @@ func (f *file) detectComment(cfg *config) {
}
var basename = strings.ToLower(filepath.Base(f.path))
for _, mfc := range cfg.MatchFileComment {
- if mfc.rePattern.MatchString(basename) {
+ if mfc.isMatch(basename) {
if mfc.isDirectLicense() {
f.group = groupBinary
return