core

package
v0.0.0-...-6165f23 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package core contains the core models of marbles. Version hiddes the internal implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

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

Version struct represent a version hidding the inner implementation which is hashicorp go-version

func ParseVersion

func ParseVersion(ver string) (*Version, error)

ParseVersion fubction

func (*Version) Compare

func (v *Version) Compare(other *Version) int

Compare compares this version to another version. Returns hashicorp/go-version compare which is:

-1 this is smalle
 0 equals
 1 this is larger

func (*Version) Equal

func (v *Version) Equal(o *Version) bool

Equal tests if two versions are equal.

func (*Version) GreaterThan

func (v *Version) GreaterThan(o *Version) bool

GreaterThan tests if this version is greater than another version.

func (*Version) GreaterThanOrEqual

func (v *Version) GreaterThanOrEqual(o *Version) bool

GreaterThanOrEqual tests if this version is greater than or equal to another version.

func (*Version) LessThan

func (v *Version) LessThan(o *Version) bool

LessThan tests if this version is less than another version.

func (*Version) LessThanOrEqual

func (v *Version) LessThanOrEqual(o *Version) bool

LessThanOrEqual tests if this version is less than or equal to another version.

func (*Version) String

func (v *Version) String() string

String prints version.

Jump to

Keyboard shortcuts

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