value

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: LGPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareOIDs

func CompareOIDs(oid1, oid2 OID) int

CompareOIDs returns an integer comparing two OIDs lexicographically. The result will be 0 if oid1 == oid2, -1 if oid1 < oid2, +1 if oid1 > oid2.

func SortOIDs

func SortOIDs(oids []OID)

SortOIDs performs sorting of the OID list.

Types

type OID

type OID []uint32

OID defines an OID.

func MustParseOID

func MustParseOID(text string) OID

MustParseOID works like ParseOID expect it panics on a parsing error.

func ParseOID

func ParseOID(text string) (OID, error)

ParseOID parses the provided string and returns a valid oid. If one of the subidentifers canot be parsed to an uint32, the function will panic.

func (OID) CommonPrefix

func (o OID) CommonPrefix(other OID) OID

CommonPrefix compares the oid with the provided one and returns a new oid containing all matching prefix subidentifiers.

func (OID) First

func (o OID) First(count int) OID

First returns the first n subidentifiers as a new oid.

func (OID) String

func (o OID) String() string

Jump to

Keyboard shortcuts

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