uuid

package module
v0.0.0-...-131f12a Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2017 License: MIT Imports: 11 Imported by: 4

README

uuid

Generate UUID by golang

Documentation

Overview

import (

"github.com/berkaroad/uuid"

)

func main(){
	id := uuid.New()
	println(id.String())

	idString := "8eb2a95c-846b-11e5-8550-8bf2f1cec1ce"
	if thisID, err := uuid.Parse(idString); err == nil {
	    println(thisID.String())
	}
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmpty

func IsEmpty(uuid UUID) bool

是否为空值

func PutToBytes

func PutToBytes(data []byte, uuid UUID)

放入到字节分片中

Types

type UUID

type UUID [16]byte

func LoadFromBytes

func LoadFromBytes(data []byte) UUID

从字节分片中加载

func New

func New() UUID

创建新的UUID

func Parse

func Parse(uuidString string) (UUID, error)

解析UUID字符串

func (UUID) String

func (self UUID) String() string

UUID的字符串形式

Jump to

Keyboard shortcuts

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