aboutsummaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.go b/config.go
index 962b0ad..1268cb8 100644
--- a/config.go
+++ b/config.go
@@ -9,7 +9,7 @@ type config struct {
LicenseIdentifier string `ini:"default::license_identifier"`
FileCopyrightText string `ini:"default::file_copyright_text"`
- MatchLicense []configMatchLicense `ini:"match-license"`
+ MatchLicense []*configMatchLicense `ini:"match-license"`
MaxLineMatch int `ini:"default::max_line_match"`
}
@@ -25,5 +25,11 @@ func (cfg *config) init() (err error) {
if cfg.MaxLineMatch <= 0 {
cfg.MaxLineMatch = defMaxLineMatch
}
+ for _, cml := range cfg.MatchLicense {
+ err = cml.init()
+ if err != nil {
+ return err
+ }
+ }
return nil
}