Sign inDemoInstall

Package Overview
File Explorer

Install Socket

Protect your apps from supply chain attacks


Package uuid implements a fast representation of UUIDs (Universally Unique Identifiers) and integrates with JSON and SQL drivers. This package supports reading of multiple formats of UUIDs, including but not limited to: The parsing-speed of UUIDs in this package is achieved in several ways: A lookup table converts hexadecimal digits to bytes. Scanning and parsing is done in place without allocating anything. Resulting bytes are written to the UUID as it is parsed. On parse errors this will leave the UUID only partially populated with data from the input string, leaving the rest of the UUID unmodified. This package just ignores non-hexadecimal digits when scanning. This can cause some odd representations of hexadecimal data to be parsed as valid UUIDs, and longer strings like these will parse successfully: However, the hexadecimal digits MUST come in pairs, and the total number of bytes represented by them MUST equal 16, or it will generate a parse error. For example, invalid UUIDs like these will not parse: All string-creating functions will generate UUIDs in the canonical format of:


Version published


# Fast UUID implementation for Go

[![Coverage Status](]( [![Build Status](]( [![GoDoc](](

This package provides a fast implementation for representing UUIDs,
parsing and generating them.  It also includes methods for marshalling
and unmarshalling JSON as well as reading and storing them in a SQL database. 

## Installation

go get

## Documentation

See or the embedded godoc in the source.


Last updated on 28 Mar 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.


Related posts

SocketSocket SOC 2 Logo


  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc