After update to go-licenses v2 uknown license is reported for gotest.tools library. The issue is license format, that was previously recognized in v1 (v1 check passes) as header type, and I think it should be the case for v2.
This is still valid Apache-2 license in gotest.tools.
https://github.com/gotestyourself/gotest.tools/blob/main/LICENSE
Did not find license for library 'gotest.tools/v3/assert'.
Did not find license for library 'gotest.tools/v3/assert/cmp'.
Did not find license for library 'gotest.tools/v3/internal/assert'.
Did not find license for library 'gotest.tools/v3/internal/format'.
Did not find license for library 'gotest.tools/v3/internal/source'.
v1: https://github.com/google/go-licenses/blob/v1.6.0/licenses/classifier.go#L95-L98
v2: https://github.com/google/go-licenses/blob/v2.0.1/licenses/classifier.go#L69-L71
Adding the following to L69 fixes the issue:
if match.MatchType != "License" && match.MatchType != "Header" {
After update to
go-licensesv2 uknown license is reported forgotest.toolslibrary. The issue is license format, that was previously recognized in v1 (v1 check passes) as header type, and I think it should be the case for v2.This is still valid Apache-2 license in
gotest.tools.https://github.com/gotestyourself/gotest.tools/blob/main/LICENSE
v1: https://github.com/google/go-licenses/blob/v1.6.0/licenses/classifier.go#L95-L98
v2: https://github.com/google/go-licenses/blob/v2.0.1/licenses/classifier.go#L69-L71
Adding the following to L69 fixes the issue: