util

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIntPtrToUint32Ptr

func GetIntPtrToUint32Ptr(i *int) (*uint32, error)

A convenience function for converting a pointer to a native Go integer to a pointer to a uint32 for use with a protobuf message. Accepts a pointer to an int and returns a uint32 pointer.

If the input is nil, nil will be returned. If a pointer to a value greater than uint32 max is submitted, an error will be returned.

func StringPtrToPortRangeUint32PtrPair

func StringPtrToPortRangeUint32PtrPair(s *string) (start *uint32, end *uint32, err error)

A convenience function for converting a *string hold a string of the form "<start>-<end>"to a pair of *uint32 representing the start and end of a port range.

Spaces will be stripped automatically. If nil is passed in, the resulting *uint32 values will be nil.

func StringToPortRangeUint32PtrPair

func StringToPortRangeUint32PtrPair(s string) (start *uint32, end *uint32, err error)

A convenience function for converting a string of the form "<start>-<end>"to a pair of *uint32 representing the start and end of a port range.

Spaces will be stripped automatically.

func StringToUint32Ptr

func StringToUint32Ptr(s string) (*uint32, error)

A convenience function for converting a string to a *uint32 for use with a protobuf message.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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