Refactor structs with some getters/setters - Peers part
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
ycc
2024-02-07 16:08:24 +01:00
parent f8a1cb6f68
commit 93e972900f
11 changed files with 260 additions and 51 deletions

View File

@ -37,7 +37,7 @@ func (sl *ServerList) GetServerByIdx(idx int) (server *Server, err error) {
// GetServerByPubkey returns a server from it's public key
func (sl *ServerList) GetServerByPubkey(pubkey string) (filtered *Server) {
for _, srv := range sl.Servers {
if srv.ServerData.PublicKey == pubkey {
if srv.PublicKey == pubkey {
return &srv
}
}