snapshot before merge

This commit is contained in:
zqlit committed 2026-06-01 17:57:22 +08:00
1 parent 2b3b2850f9
commit 21fc65b3ae
145 files changed
+9786 -59

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
with open(r"E:\GitHub\blog\write-go\internal\posts\posts.go", "r", encoding="utf-8", errors="replace") as f:
content = f.read()
# Simplify Init - just call config.Init, not recycle
old_init = '''func Init() {
config.Init()
recycle.InitRecycleBin()
}'''
new_init = '''func Init() {
config.Init()
}'''
content = content.replace(old_init, new_init)
# Remove recycle import
content = content.replace('\t"write-server/internal/recycle"\n', '')
with open(r"E:\GitHub\blog\write-go\internal\posts\posts.go", "w", encoding="utf-8", errors="replace") as f:
f.write(content)
print("Done")