diff options
-rwxr-xr-x | main.odin | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -186,12 +186,15 @@ main :: proc() { output_file_name := fmt.aprintf("{}_Knekt.html", os.args[1][:len(os.args[1])-4])
os.remove(output_file_name)
output_file_handle, _ := os.open(output_file_name, os.O_CREATE, 0o777)
- os.write_string(output_file_handle, "") // TODO: Figure out how to write this to a file
+ os.close(output_file_handle)
+ output_file_handle, _ = os.open(output_file_name, os.O_RDWR, 0o777)
os.write_string(output_file_handle, total_output) // TODO: Figure out how to write this to a file
os.close(output_file_handle)
- fmt.printf("Wrote file: {}", output_file_name)
- //fmt.printf("\n\n\nTOTAL OUTPUT:\n\n\n")
- //fmt.println(total_output)
+
+ fmt.printf("Wrote file: {}\n", output_file_name)
+
+ /*fmt.printf("\n\n\nTOTAL OUTPUT:\n\n\n")
+ fmt.println(total_output)*/
}
append :: proc(input, to_add: string) -> string {
|