utils

package
v1.4.0 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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeMAC added in v1.2.0

func NormalizeMAC(mac string) string

NormalizeMAC parses a MAC address string and returns its canonical lowercase colon-separated form (e.g. "aa:bb:cc:dd:ee:ff"). Handles colon-separated, hyphen-separated, and dot-separated (Cisco) formats, as well as mixed casing. If the input is not a valid MAC, it is returned unchanged so that downstream validation can report the real error.

func UnitTestDB

func UnitTestDB(ctx context.Context, t *testing.T, dbConf cdb.Config) (*cdb.Session, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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