fix(machines): renaming following review comments

This commit is contained in:
Adrien Raffin-Caboisse 2022-02-20 23:50:08 +01:00
parent b3d0fb7a93
commit 5242025ab3

View File

@ -188,13 +188,13 @@ func (h *Headscale) getFilteredByACLPeers(machine *Machine) (Machines, error) {
} }
} }
authorizedMachines := make([]Machine, 0, len(peers)) authorizedPeers := make([]Machine, 0, len(peers))
for _, m := range peers { for _, m := range peers {
authorizedMachines = append(authorizedMachines, m) authorizedPeers = append(authorizedPeers, m)
} }
sort.Slice( sort.Slice(
authorizedMachines, authorizedPeers,
func(i, j int) bool { return authorizedMachines[i].ID < authorizedMachines[j].ID }, func(i, j int) bool { return authorizedPeers[i].ID < authorizedPeers[j].ID },
) )
log.Trace(). log.Trace().
@ -202,7 +202,7 @@ func (h *Headscale) getFilteredByACLPeers(machine *Machine) (Machines, error) {
Str("machine", machine.Name). Str("machine", machine.Name).
Msgf("Found some machines: %v", machines) Msgf("Found some machines: %v", machines)
return authorizedMachines, nil return authorizedPeers, nil
} }
func (h *Headscale) getDirectPeers(machine *Machine) (Machines, error) { func (h *Headscale) getDirectPeers(machine *Machine) (Machines, error) {