Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fa2c4f5c8 | |||
| 52a768f929 |
+2
-2
@@ -9,7 +9,7 @@ import (
|
|||||||
// DecodeAddress ... TODO
|
// DecodeAddress ... TODO
|
||||||
//
|
//
|
||||||
// revive:disable:function-result-limit
|
// revive:disable:function-result-limit
|
||||||
func DecodeAddress(addr netip.Addr) (Ring, RegionID, ZoneID, uint) {
|
func DecodeAddress(addr netip.Addr) (RingID, RegionID, ZoneID, uint) {
|
||||||
// revive:enable:function-result-limit
|
// revive:enable:function-result-limit
|
||||||
if addr.IsValid() {
|
if addr.IsValid() {
|
||||||
if addr.Is4In6() {
|
if addr.Is4In6() {
|
||||||
@@ -26,7 +26,7 @@ func DecodeAddress(addr netip.Addr) (Ring, RegionID, ZoneID, uint) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// revive:disable:function-result-limit
|
// revive:disable:function-result-limit
|
||||||
func unsafeDecodeAddress(a, b, c, d byte) (Ring, RegionID, ZoneID, uint) {
|
func unsafeDecodeAddress(a, b, c, d byte) (RingID, RegionID, ZoneID, uint) {
|
||||||
// revive:enable:function-result-limit
|
// revive:enable:function-result-limit
|
||||||
switch {
|
switch {
|
||||||
case a != 10:
|
case a != 10:
|
||||||
|
|||||||
+3
-3
@@ -8,12 +8,12 @@ import (
|
|||||||
"darvaza.org/core"
|
"darvaza.org/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ring ... TODO
|
// RingID ... TODO
|
||||||
type Ring int
|
type RingID int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// InvalidRing ... TODO
|
// InvalidRing ... TODO
|
||||||
InvalidRing Ring = iota - 1
|
InvalidRing RingID = iota - 1
|
||||||
// RingZero ... TODO
|
// RingZero ... TODO
|
||||||
RingZero
|
RingZero
|
||||||
// RingOne ... TODO
|
// RingOne ... TODO
|
||||||
|
|||||||
Reference in New Issue
Block a user