MCPcopy
hub / github.com/syncthing/syncthing / Short

Method Short

lib/protocol/deviceid.go:106–108  ·  view source on GitHub ↗

Short returns an integer representing bits 0-63 of the device ID.

()

Source from the content-addressed store, hash-verified

104
105// Short returns an integer representing bits 0-63 of the device ID.
106func (n DeviceID) Short() ShortID {
107 return ShortID(binary.BigEndian.Uint64(n[:]))
108}
109
110func (n DeviceID) MarshalText() ([]byte, error) {
111 return []byte(n.String()), nil

Callers 15

LogValueMethod · 0.95
tryNATDeviceMethod · 0.80
TestShortIDStringFunction · 0.80
internalCloseMethod · 0.80
TestStressBufferPoolFunction · 0.80
dialDevicesMethod · 0.80
resolveDialTargetsMethod · 0.80
TestDialQueueSortFunction · 0.80
shortDevicesFunction · 0.80

Calls 2

ShortIDTypeAlias · 0.85
Uint64Method · 0.80

Tested by 15

TestShortIDStringFunction · 0.64
TestStressBufferPoolFunction · 0.64
TestDialQueueSortFunction · 0.64
shortDevicesFunction · 0.64
TestCopierCleanupFunction · 0.64
TestDeleteBehindSymlinkFunction · 0.64
TestPullCaseOnlyRenameFunction · 0.64