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

Function SetNodeInterface

node.go:33–37  ·  view source on GitHub ↗

SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. If name is "" then the first usable interface found will be used or a random Node ID will be generated. If a named interface cannot be found then false is returned. SetNodeInterface never fails when name is "".

(name string)

Source from the content-addressed store, hash-verified

31//
32// SetNodeInterface never fails when name is "".
33func SetNodeInterface(name string) bool {
34 defer nodeMu.Unlock()
35 nodeMu.Lock()
36 return setNodeInterface(name)
37}
38
39func setNodeInterface(name string) bool {
40 iname, addr := getHardwareInterface(name) // null implementation for js

Callers 2

TestNodeFunction · 0.85
TestNodeIDFunction · 0.85

Calls 1

setNodeInterfaceFunction · 0.85

Tested by 2

TestNodeFunction · 0.68
TestNodeIDFunction · 0.68