uuid

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 5 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

uuid

Go Reference

Générateur de chaînes au format UUID.


Copyright (c) 2022 Archivage Numérique

Documentation

Overview

Package uuid propose deux fonctions permettant de génèrer des chaînes au format UUID en utilisant des octets purement aléatoires.

Ces UUID ne sont pas conformes à la norme RFC 4122 mais ils sont utilisables comme identifiants uniques.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() (string, error)

Generate utilise uniquement le module crypto/rand pour générer des UUID. En cas d'erreur, celle-ci est retournée.

func IsValid

func IsValid(s string) bool

IsValid permet de vérifier qu'une chaîne de caractères est bien au format UUID.

func New

func New() string

New génère des UUID aléatoires grâce au module crypto/rand. Si l'utilisation de celui-ci produit une erreur, le module math/rand est alors utilisé. Ainsi, un UUID est systématiquement retourné.

Types

This section is empty.

Jump to

Keyboard shortcuts

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