From 8023c2ab9c674c547f0bd28ffa0bfa7fb7eba8d4 Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Fri, 21 Oct 2022 14:54:41 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8faffba..125364d 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ import ( func main() { //具体用法请查看struct注释 - if e:=BitSrun.Login(&BitSrun.Conf{ + conf:=&BitSrun.Conf{ Https: false, Client: nil, LoginInfo: BitSrun.LoginInfo{ @@ -154,8 +154,18 @@ func main() { Enc: "", }, }, - });e!=nil { - panic(e) + } + + online, clientIP, e := BitSrun.LoginStatus(conf) + if e!=nil { + panic(e) + } + + if !online { + e=BitSrun.DoLogin(clientIP, conf) + if e!=nil { + panic(e) + } } } ``` \ No newline at end of file