idutil

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package idutil builds stable node IDs from name parts. It mirrors the Python original's extract._make_id and build._normalize_id so IDs generated here are byte-for-byte compatible with upstream graph.json files: NFKC-normalize, replace every non-word (Unicode) run with "_", collapse repeats, strip, fold.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeID

func MakeID(parts ...string) string

MakeID joins one or more name parts into a canonical node ID. Empty parts are skipped; each part is stripped of leading/trailing "_" and "." before joining.

func NormalizeID

func NormalizeID(s string) string

NormalizeID canonicalizes an already-joined ID the same way MakeID does. Used to reconcile edge endpoints whose IDs differ only in casing or punctuation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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