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
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
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),