snapshot before merge
This commit is contained in:
1 parent
2b3b2850f9
commit
21fc65b3ae
145 files changed
+9786
-59
No files matched your search
@@ -0,0 +1,20 @@
|
||||
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "r", encoding="utf-8", errors="replace") as f:
|
||||
content = f.read()
|
||||
|
||||
# 1. Remove writeconfig line
|
||||
import re
|
||||
content = re.sub(r'\t+writeconfig "write-server/internal/config"\r?\n', '', content)
|
||||
|
||||
# 2. Replace writeconfig.Init() with posts.Init()
|
||||
content = content.replace('writeconfig.Init()', 'posts.Init()')
|
||||
|
||||
# 3. Add posts import after writeserver
|
||||
content = content.replace(
|
||||
'"writebot/internal/writeserver"',
|
||||
'"writebot/internal/writeserver"\n\t"write-server/pkg/posts"'
|
||||
)
|
||||
|
||||
with open(r"E:\GitHub\blog\bot-go\cmd\writebot\main.go", "w", encoding="utf-8", errors="replace") as f:
|
||||
f.write(content)
|
||||
|
||||
print("Done")
|
||||
Reference in new issue
Block a user