gnuuid

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: MIT Imports: 5 Imported by: 6

README

Package gnuuid

This is a helper package to generate UUID v5 for globalnames.org name-strings or files.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GNDomain = u.Must(u.Parse("90181196-fecf-5082-a4c1-411d4f314cda"))
	Nil      = u.Nil
)

Domain is UUIDv5 seed for `globalnames.org` domain identifiers. It was generated originally with

u.NewSHA1(u.NameSpaceDNS, []byte("globalnames.org"))

Functions

func FromFile added in v0.2.0

func FromFile(path string) (u.UUID, error)

FromFile reads the content of a file and generates UUIDv5 from its content. It takes a file path as an argument and returns a UUIDv5 based on the GNDomain and the file's content.

func New

func New(name string) u.UUID

New creates new UUIDv5 identifier for globalnames. It takes a string as an argument and returns a UUIDv5 based on the GNDomain and the provided string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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