modver

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 8 Imported by: 1

README

modver

PkgGoDev

modver is utility for Go Modules.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleVersion

type ModuleVersion struct {
	Module  string
	Version string
}

ModuleVersion has module path and its version.

func AllVersion

func AllVersion(module string) ([]ModuleVersion, error)

AllVersion get available all versions of the module.

func FilterVersion

func FilterVersion(module, constraints string) ([]ModuleVersion, error)

FilterVersion returns versions of the module which satisfy the constraints such as ">= v2.0.0" The constraints rule uses github.com/hashicorp/go-version.

func LatestVersion

func LatestVersion(module string, max int) ([]ModuleVersion, error)

LatestVersion returns most latest versions (<= max) of each minner version.

func (ModuleVersion) String

func (modver ModuleVersion) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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