Maint: truncate servers format output file

This commit is contained in:
Quentin McGaw (desktop)
2021-09-23 14:38:46 +00:00
parent f9aadeef1c
commit 5d74320ee7

View File

@@ -104,7 +104,7 @@ func (c *CLI) FormatServers(args []string) error {
}
output = filepath.Clean(output)
file, err := os.OpenFile(output, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644)
file, err := os.OpenFile(output, os.O_TRUNC|os.O_WRONLY|os.O_CREATE, 0644)
if err != nil {
return fmt.Errorf("%w: %s", ErrOpenOutputFile, err)
}