This commit is contained in:
Daniel Gavin
2021-04-22 00:08:03 +02:00
parent b18e8898d8
commit 9b8563dfc0
2 changed files with 0 additions and 8 deletions
-5
View File
@@ -68,9 +68,7 @@ main :: proc() {
tick_time := time.tick_now();
if os.is_file(path) {
if _, ok := args.write.(bool); ok {
backup_path := strings.concatenate({path, "_bk"}, context.temp_allocator);
if data, ok := format_file(path); ok {
@@ -84,17 +82,14 @@ main :: proc() {
fmt.eprintf("failed to write %v", path);
}
} else {
if data, ok := format_file(path); ok {
fmt.println(transmute(string)data);
}
}
} else if os.is_dir(path) {
filepath.walk(path, walk_files);
for file in files {
fmt.println(file);
backup_path := strings.concatenate({file, "_bk"}, context.temp_allocator);