Socket
Socket
Sign inDemoInstall

github.com/m4rw3r/uuid

Package Overview
Dependencies
0
Maintainers
0
Alerts
File Explorer

Install Socket

Protect your apps from supply chain attacks

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:

    v1.0.1

Version published
Maintainers
0

Readme

# Fast UUID implementation for Go

[![Coverage Status](https://img.shields.io/coveralls/m4rw3r/uuid.svg)](https://coveralls.io/r/m4rw3r/uuid?branch=master) [![Build Status](https://travis-ci.org/m4rw3r/uuid.svg?branch=master)](https://travis-ci.org/m4rw3r/uuid) [![GoDoc](https://godoc.org/github.com/m4rw3r/uuid?status.svg)](https://godoc.org/github.com/m4rw3r/uuid)

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

```bash
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 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.

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