matcher

package
v0.0.0-...-c4913dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLicenseFromDetector

func GetLicenseFromDetector(licenseTxt string, licSha string) []string

func GetPomCommentLicense

func GetPomCommentLicense(pomTxt string) string

read licenses which presented as a comment in the pom file

func InitLicenseMatcher

func InitLicenseMatcher(licensesFolder string) error

read licenses db and instantiate the classifier

func MatchLicenseTxt

func MatchLicenseTxt(licenseTxt string) []string

try to match license txt to known spdx license 1st try to match to license classifier and then to license detector

Types

type DiscoveryFiler

type DiscoveryFiler struct {
	LicenseContent string
}

func (DiscoveryFiler) Close

func (df DiscoveryFiler) Close()

func (DiscoveryFiler) PathsAreAlwaysSlash

func (df DiscoveryFiler) PathsAreAlwaysSlash() bool

func (DiscoveryFiler) ReadDir

func (df DiscoveryFiler) ReadDir(path string) ([]filer.File, error)

func (DiscoveryFiler) ReadFile

func (df DiscoveryFiler) ReadFile(path string) (content []byte, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL