Help us shape the future of Go! Take the 2026 Go Developer Survey

guid

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: BSD-3-Clause Imports: 5 Imported by: 28

Documentation

Overview

Package guid implements the mixed-endian GUID as implemented by Microsoft.

Index

Constants

View Source
const (
	// Size represents number of bytes in a GUID
	Size = 16
	// UExample is a example of a string GUID
	UExample = "01234567-89AB-CDEF-0123-456789ABCDEF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GUID

type GUID [Size]byte

GUID represents a unique identifier.

func MustParse

func MustParse(s string) *GUID

MustParse parses a guid string or panics.

func Parse

func Parse(s string) (*GUID, error)

Parse parses a guid string.

func (*GUID) MarshalJSON

func (u *GUID) MarshalJSON() ([]byte, error)

MarshalJSON implements the marshaller interface. This allows us to actually read and edit the json file

func (GUID) String

func (u GUID) String() string

func (*GUID) UnmarshalJSON

func (u *GUID) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the unmarshaller interface. This allows us to actually read and edit the json file

Jump to

Keyboard shortcuts

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