13 lines
562 B
Python
13 lines
562 B
Python
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "r", encoding="utf-8", errors="replace") as f:
|
|
content = f.read()
|
|
|
|
# Fix the import block formatting
|
|
content = content.replace('"writebot/internal/writeserver"\n\t"write-server/pkg/posts"\n\n)', '"writebot/internal/writeserver"\n\t"write-server/pkg/posts"\n)')
|
|
|
|
# Fix the weird indentation on "os"
|
|
content = content.replace('\t\t"os"', '\t"os"')
|
|
|
|
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "w", encoding="utf-8", errors="replace") as f:
|
|
f.write(content)
|
|
print("Fixed formatting")
|