finder

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compatible added in v0.0.11

func Compatible(source string) bool

Types

type Finder

type Finder interface {
	// Find returns the special form module name for the latest commit,
	// as well as a list of tags that follow proper semver format understood
	// by the Go compiler.
	Find(string) (*Result, error)
}

func New

func New(opts Options) Finder
type Head struct {
	// Pseudo represents Go's custom version string for SHAs which are
	// not represented by a SemVer string.
	// e.g.
	Custom string
	Commit string
}

type Options

type Options struct {
	Timeout  time.Duration
	Versions map[string]Versions
}

type Result

type Result struct {
	Text   string
	Latest Head
	Tags   []Tag
}

type Tag

type Tag struct {
	SemVer string
	Commit string
}

type Versions

type Versions interface {
	// Request the list of semver tags set in the source git repository.
	Request(source string) (*Result, error)
}

func Github

func Github(baseURL string, client *http.Client) Versions

Directories

Path Synopsis
Package findertest contains autogenerated mocks.
Package findertest contains autogenerated mocks.

Jump to

Keyboard shortcuts

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