Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMavenPomName ¶
ToMavenPomName is helper method to build name exists in https://repo1.maven.org
example name: org.apache.logging.log4j:log4j-core version: 2.17.1 output: org/apache/logging/log4j/log4j-core/2.17.1/log4j-core-2.17.1.pom
Types ¶
type Project ¶
type Project struct { Licenses struct { License struct { Name string `xml:"name"` } `xml:"license"` } `xml:"licenses"` }
Project is struct to unmarshal pom.xml of java project
type Scanner ¶
Scanner is struct to scan license info Crawler is exported to modify or make it easy to test by mock
func (*Scanner) ScanLicense ¶
ScanLicense returns license fetched from repo1.maven.org/maven2, returns license if confidence is over 90% example https://repo1.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.17.1/log4j-core-2.17.1.pom name is required in a format like org/apache/logging/log4j/log4j-core/2.17.1/log4j-core-2.17.1.pom If structure of pom is not expected, Detection logic is depends on github.com/google/licenseclassifier