github

package
Version: v0.2.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoAPI

type RepoAPI struct {
	Client *github.Client
}

RepoAPI implements license.Finder and looks up the license of a module using the GitHub Repository License API1.

This API will return the detected license based on the current source code. Therefore it is theoretically possible for a dependency to have a different license based on the exact match of the SHA (the project changed licenses). In practice, this is quite rare so it is up to the caller to determine if this is an acceptable risk or not.

func (*RepoAPI) License

func (f *RepoAPI) License(ctx context.Context, m module.Module) (*license.License, error)

License implements license.Finder

Jump to

Keyboard shortcuts

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