Socket
Socket
Sign inDemoInstall

github.com/m4rw3r/uuid

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/m4rw3r/uuid

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

Readme

Source

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 github.com/m4rw3r/uuid

Documentation

See http://godoc.org/github.com/m4rw3r/uuid or the embedded godoc in the source.

FAQs

Last updated on 28 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • 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