chore(fmt): apply make fmt command

This commit is contained in:
Adrien Raffin-Caboisse 2022-02-14 15:54:51 +01:00
parent 9cedbbafd4
commit d8c4c3163b
No known key found for this signature in database
GPG key ID: 7FB60532DEBEAD6A
8 changed files with 399 additions and 130 deletions

View file

@ -192,7 +192,10 @@ func (h *Headscale) getFilteredByACLPeers(machine *Machine) (Machines, error) {
for _, m := range mMachines {
authorizedMachines = append(authorizedMachines, m)
}
sort.Slice(authorizedMachines, func(i, j int) bool { return authorizedMachines[i].ID < authorizedMachines[j].ID })
sort.Slice(
authorizedMachines,
func(i, j int) bool { return authorizedMachines[i].ID < authorizedMachines[j].ID },
)
log.Trace().
Caller().
@ -695,7 +698,11 @@ func (machine Machine) toNode(
hostname = fmt.Sprintf(
"%s.%s.%s",
machine.Name,
strings.ReplaceAll(machine.Namespace.Name, "@", "."), // Replace @ with . for valid domain for machine
strings.ReplaceAll(
machine.Namespace.Name,
"@",
".",
), // Replace @ with . for valid domain for machine
baseDomain,
)
} else {