docs: 更新 module 使用指导

This commit is contained in:
Mmx233
2023-06-04 20:34:50 +08:00
parent 92575d812e
commit af3b4d6439

View File

@@ -169,7 +169,7 @@ import (
func main() {
//具体用法请查看 struct 注释
conf:=&srun.Conf{
client:=srun.New(&srun.Conf{
Https: false,
Client: nil,
LoginInfo: srun.LoginInfo{
@@ -186,15 +186,15 @@ func main() {
Enc: "",
},
},
}
})
online, clientIP, e := srun.LoginStatus(conf)
online, ip, e := client.LoginStatus()
if e!=nil {
panic(e)
}
if !online {
e=srun.DoLogin(clientIP, conf)
e=client.DoLogin(ip)
if e!=nil {
panic(e)
}