common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version string

Version represents the protocol version string.

func (Version) Matches

func (v Version) Matches(other string) bool

Matches returns true if the major and minor versions match. For example:

'v1' and 'v1.2.0' => false 'v1' and 'v1.0.0' => true 'v1' and 'v1.0.1' => true 'v1.0' and 'v1.0.1' => true 'v1.1' and 'v1.1.4' => true 'v1.1' and 'v1.2.0' => false.

func (Version) Validate

func (v Version) Validate() error

Validate validates the format of the version string.

Jump to

Keyboard shortcuts

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