versiondiff

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DirectionSame is the direction of the version diff when the from and to versions are the same
	DirectionSame = "same"
	// DirectionUpgrade is the direction of the version diff when the from version is less than the to version
	DirectionUpgrade = "upgrade"
	// DirectionDowngrade is the direction of the version diff when the from version is greater than the to version
	DirectionDowngrade = "downgrade"
	// DirectionUnknown is the direction of the version diff when the from and to versions are unknown
	DirectionUnknown = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VersionDiff

type VersionDiff struct {
	From *version.Version
	To   *version.Version
}

VersionDiff represents the difference between two versions

func (*VersionDiff) Direction

func (v *VersionDiff) Direction() string

Direction gets the direction of the version diff as a string

func (*VersionDiff) DirectionEmoji added in v0.1.2

func (v *VersionDiff) DirectionEmoji() string

DirectionEmoji gets the direction of the version diff as an emoji

func (*VersionDiff) IsDowngrade

func (v *VersionDiff) IsDowngrade() bool

IsDowngrade checks if the from version is greater than the to version

func (*VersionDiff) IsSameVersion

func (v *VersionDiff) IsSameVersion() bool

IsSameVersion checks if the from and to versions are the same

func (*VersionDiff) IsUpgrade

func (v *VersionDiff) IsUpgrade() bool

IsUpgrade checks if the from version is less than the to version

Jump to

Keyboard shortcuts

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