Skip to content

Commit 97ca321

Browse files
authored
Update main.go
Make license detection configurable via LicenceTerms.json - Updated `hasLicense` function to dynamically load license terms from `../LicenceTerms.json`. - Falls back to default terms if the file is missing or has invalid JSON. - Ensures no additional functions are introduced for simplicity and maintainability.
1 parent 2c113c8 commit 97ca321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addlicense/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ func hasLicense(b []byte) bool {
490490
}
491491

492492
// Default conditions
493-
defaultTerms := []string{"copyright", "mozilla public", "spdx-license-identifier"}
493+
defaultTerms := []string{"hashicorp, inc.", "mozilla public", "spdx-license-identifier"}
494494

495495
// Load conditions from config file
496496
configPath := "../LicenceCopywrite.json"

0 commit comments

Comments
 (0)