version

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package version provides version processing for mattercheck by wrapping the github.com/blang/semver package.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoVersionGiven = errors.New("no version given")
	ErrNoVersionFound = errors.New("no version found")
)

Functions

This section is empty.

Types

type ErrUnexpectedIDFormat added in v0.2.4

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

func (*ErrUnexpectedIDFormat) Error added in v0.2.4

func (err *ErrUnexpectedIDFormat) Error() string

type Version

type Version struct {
	*semver.Version
	Enterprise bool // "team" if false
}

A Version represents a Mattermost version. It can distinguish between Enterprise and Team installations.

func ExtractFromBytes

func ExtractFromBytes(text []byte, ent bool) (*Version, error)

ExtractFromBytes tries to find version information in a byte slice using regular expressions.

func ExtractFromHeader

func ExtractFromHeader(xver string) (*Version, error)

ExtractFromHeader parses an X-Version-Id response header into a Version struct.

func Parse added in v0.2.1

func Parse(v string, ent bool) (*Version, error)

Parse tries to parse a string into a Version object.

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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