fetchclient

package
v0.0.0-...-a9f5107 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSemverPrerelease is returned when a version is a pre-release.
	ErrSemverPrerelease = errors.New("pre-release versions are not supported")
)

Functions

This section is empty.

Types

type Client

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

Client is a client used to fetch latest package version.

func New

func New(ctx context.Context) *Client

New returns a new client.

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, config *source.Config) (string, error)

Fetch fetches new versions based on the given config and returns a valid semver version that can be used with the Go semver package. The version is guaranteed to contain a "v" prefix.

Jump to

Keyboard shortcuts

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