util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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