gh

package
v0.0.0-...-ce99828 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepoNotFound    = errors.New("repository does not exist")
	ErrLicenseNotFound = errors.New("no license found for repository")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	*github.Client
}

func NewClient

func NewClient(ctx context.Context, token string) *Client

NewClient creates a GitHub client using the supplied personal access token for authentication.

func (*Client) GetLicense

func (c *Client) GetLicense(ctx context.Context, repoURL string) (*github.RepositoryLicense, error)

GetLicense retrieves the repository license, as determined by GitHub (if one has been found).

Jump to

Keyboard shortcuts

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