Files
blog/tmp_imp2.py
T

26 lines
441 B
Python
Raw Normal View History

2026-06-01 17:57:22 +08:00
path = r"E:\GitHub\blog\bot-go\internal\tgcore\tgcore.go"
with open(path, "rb") as f:
content = f.read().decode("utf-8")
old = '''import (
"bytes"
"encoding/json"
"io"
"net/http"
"strings"
)'''
new = '''import (
"bytes"
"encoding/json"
"fmt"
"io"
"net"
"net/http"
"strings"
"time"
)'''
content = content.replace(old, new)
with open(path, "wb") as f:
f.write(content.encode("utf-8"))
print("Fixed imports properly")