_go

package
v0.0.0-...-3b913cb Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LicenseGetter

type LicenseGetter struct {
	// contains filtered or unexported fields
}

LicenseGetter provides methods to retrieve the licenses associated with go packages

func NewLicenseGetter

func NewLicenseGetter(webLG WebLicenseGetter) *LicenseGetter

NewLicenseGetter returns a new instance of LicenseGetter using the provided WebLicenseGetter where possible

func (*LicenseGetter) GetLicense

func (lg *LicenseGetter) GetLicense(packagePath string) (diligent.License, error)

GetLicense will return the license associated with a given go package

type WebLicenseGetter

type WebLicenseGetter interface {
	IsCompatibleURL(s string) bool
	GetLicenseFromURL(s string) (diligent.License, error)
}

WebLicenseGetter retrieves license information from an online source

Jump to

Keyboard shortcuts

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