Files
blog/tmp_import.py
T
2026-06-01 17:57:22 +08:00

28 lines
492 B
Python

path = r"E:\GitHub\blog\bot-go\internal\tgcore\tgcore.go"
with open(path, "rb") as f:
content = f.read().decode("utf-8")
# Add missing imports
old_import = '''import (
"encoding/json"
"fmt"
"io"
"net/http"
"strings"
)'''
new_import = '''import (
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"strings"
"time"
)'''
content = content.replace(old_import, new_import)
with open(path, "wb") as f:
f.write(content.encode("utf-8"))
print("Added net, time imports to tgcore")