Merge pull request #144 from squat/fix_graph_newlines

pkg/mesh/graph.go: fix format
This commit is contained in:
leonnicolas 2021-04-12 00:41:25 +02:00 committed by GitHub
commit 6684d5bca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,9 +169,9 @@ func nodeLabel(location, name string, cidr *net.IPNet, priv, wgIP net.IP, endpoi
if endpoint != nil {
label = append(label, endpoint.String())
}
return graphEscape(strings.Join(label, "\n"))
return graphEscape(strings.Join(label, "\\n"))
}
func peerLabel(peer *Peer) string {
return graphEscape(fmt.Sprintf("%s\n%s\n", peer.Name, peer.Endpoint.String()))
return graphEscape(fmt.Sprintf("%s\\n%s\n", peer.Name, peer.Endpoint.String()))
}