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