mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
style
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user