Fix missing blank line between peers in add command

This commit is contained in:
bullshar-k
2026-07-26 05:48:52 -04:00
parent 886b279eef
commit 1af9a9cd04
+1 -1
View File
@@ -239,7 +239,7 @@ func cmdAdd(args []string) {
fmt.Fprintf(os.Stderr, "Error reading server config file: %v\n", err)
os.Exit(1)
}
newServerContent := strings.TrimRight(string(serverContent), "\n") + strings.Join(peerBlocks, "") + "\n"
newServerContent := strings.TrimRight(string(serverContent), "\n") + "\n" + strings.Join(peerBlocks, "") + "\n"
if err := os.WriteFile(serverPath, []byte(newServerContent), 0600); err != nil {
fmt.Fprintf(os.Stderr, "Error writing server config: %v\n", err)
os.Exit(1)