MCPcopy
hub / github.com/google/uuid / NodeID

Function NodeID

node.go:60–68  ·  view source on GitHub ↗

NodeID returns a slice of a copy of the current Node ID, setting the Node ID if not already set.

()

Source from the content-addressed store, hash-verified

58// NodeID returns a slice of a copy of the current Node ID, setting the Node ID
59// if not already set.
60func NodeID() []byte {
61 defer nodeMu.Unlock()
62 nodeMu.Lock()
63 if nodeID == zeroID {
64 setNodeInterface("")
65 }
66 nid := nodeID
67 return nid[:]
68}
69
70// SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes
71// of id are used. If id is less than 6 bytes then false is returned and the

Callers 2

TestNodeFunction · 0.85
TestNodeIDFunction · 0.85

Calls 1

setNodeInterfaceFunction · 0.85

Tested by 2

TestNodeFunction · 0.68
TestNodeIDFunction · 0.68