4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-17 19:56:06 +00:00

Fix #975 by not exporting uint8

This commit is contained in:
Neil Alexander
2022-11-01 17:42:52 +00:00
parent ee33bd248f
commit 590d83aa9c
5 changed files with 8 additions and 9 deletions

View File

@ -19,7 +19,7 @@ type PeerEntry struct {
IPAddress string `json:"address"`
PublicKey string `json:"key"`
Port uint64 `json:"port"`
Priority uint8 `json:"priority"`
Priority uint64 `json:"priority"`
Coords []uint64 `json:"coords"`
Remote string `json:"remote"`
RXBytes DataUnit `json:"bytes_recvd"`
@ -36,7 +36,7 @@ func (a *AdminSocket) getPeersHandler(req *GetPeersRequest, res *GetPeersRespons
IPAddress: net.IP(addr[:]).String(),
PublicKey: hex.EncodeToString(p.Key),
Port: p.Port,
Priority: p.Priority,
Priority: uint64(p.Priority), // can't be uint8 thanks to gobind
Coords: p.Coords,
Remote: p.Remote,
RXBytes: DataUnit(p.RXBytes),