resolver

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_PROXY_URL = "https://proxy.golang.org"

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHub added in v0.1.1

type GitHub struct {
	// Client is the GitHub client.
	Client *github.Client
}

type Resolver

type Resolver struct {
	Pkg             string
	Value           string
	Hash            bool
	ConstraintCheck *semver.Constraints
	// contains filtered or unexported fields
}

func (*Resolver) GithubFallbackResolveVersion added in v0.1.1

func (v *Resolver) GithubFallbackResolveVersion() (string, error)

func (*Resolver) ParseVersion

func (v *Resolver) ParseVersion(version string) error

Parse the given string to be either a semver version string or a commit hash

func (*Resolver) ResolveClosestVersion

func (v *Resolver) ResolveClosestVersion() (string, error)

Resolve the closes version to the given semver from the proxy

func (*Resolver) ResolveLatestVersion

func (v *Resolver) ResolveLatestVersion() (VersionInfo, error)

resolve the latest version from the proxy

func (*Resolver) ResolveVersion

func (v *Resolver) ResolveVersion() (string, error)

Resolve the version for the given package by checking with the proxy for either the specified version or getting the latest version on the proxy

type VersionInfo

type VersionInfo struct {
	Version string    // version string
	Time    time.Time // commit time
}

Jump to

Keyboard shortcuts

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