versiondiff

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 1 Imported by: 0

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