uuid

package
v3.0.0-...-0f0c0e2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(format string, a ...interface{}) string

Generate creates a UUID based on a hashed string derived from the input format and arguments. This function is used primarilty in generating the NGINX Id

Parameters:

  • format: A format string, similar to fmt.Sprintf.
  • a: Variadic arguments to be substituted into the format string.

Process:

  1. Creates a SHA-256 hash from the formatted string (using `fmt.Sprintf`).
  2. Converts the hash to a hexadecimal string.
  3. Generates an MD5-based UUID using the hashed string.

Returns:

A string representation of the generated UUID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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