Documentation
¶
Overview ¶
Copyright 2026 YLD Limited SPDX-License-Identifier: Apache-2.0 Package naming provides identifier sanitization and conversion utilities for translating between HCL and YAML naming conventions. It handles dash-to-underscore mapping, identifier deduplication, and safe identifier generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeIdentifier ¶
SanitizeIdentifier replaces non-alphanumeric characters with underscores and ensures a valid identifier.
func ToHCLKey ¶
ToHCLKey converts a name to an HCL-compatible key by replacing hyphens with underscores.
func ToYAMLKey ¶
ToYAMLKey converts a name to a YAML-compatible key by replacing underscores with hyphens.
func UniqueIdentifier ¶
UniqueIdentifier returns base or a suffixed variant that does not collide with existing.
func UniqueIdentifierInSet ¶
UniqueIdentifierInSet returns base or a suffixed variant not present in the existing set.
Types ¶
This section is empty.