Ouput files without .txt suffix
This commit is contained in:
@ -129,7 +129,7 @@ func (rb *RouterBackup) BackupCommands(commands []string, outputDir string) erro
|
|||||||
return fmt.Errorf("failed to create directory %s: %v", outputDir, err)
|
return fmt.Errorf("failed to create directory %s: %v", outputDir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
filename := fmt.Sprintf("%s.txt", rb.hostname)
|
filename := rb.hostname
|
||||||
filepath := filepath.Join(outputDir, filename)
|
filepath := filepath.Join(outputDir, filename)
|
||||||
|
|
||||||
// Truncate file at start
|
// Truncate file at start
|
||||||
|
Reference in New Issue
Block a user