From 9a34eb8d524efcd33de28a9d68372401c6f7e085 Mon Sep 17 00:00:00 2001 From: kunmeng <811096647@qq.com> Date: Wed, 19 Jun 2024 21:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9D=97=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MiJia.go | 4 ++-- go.mod | 3 --- login.go | 2 +- model.go | 2 +- test/login_test.go | 6 +++--- 5 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 go.mod diff --git a/MiJia.go b/MiJia.go index fe5e6c7..56d2718 100644 --- a/MiJia.go +++ b/MiJia.go @@ -1,8 +1,8 @@ -package mijia_go_sdk +package mijia import ( "encoding/json" - "mijia-go-sdk/model" + "mijia/model" "strconv" ) diff --git a/go.mod b/go.mod deleted file mode 100644 index e52a70d..0000000 --- a/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module mijia-go-sdk - -go 1.21 diff --git a/login.go b/login.go index ea5bb12..61032b0 100644 --- a/login.go +++ b/login.go @@ -1,4 +1,4 @@ -package mijia_go_sdk +package mijia import ( "crypto/hmac" diff --git a/model.go b/model.go index e2ea105..df463e6 100644 --- a/model.go +++ b/model.go @@ -1,4 +1,4 @@ -package mijia_go_sdk +package mijia // 小米认证授权信息 type Authorize struct { diff --git a/test/login_test.go b/test/login_test.go index 7162770..4c568e3 100644 --- a/test/login_test.go +++ b/test/login_test.go @@ -3,7 +3,7 @@ package test import ( "encoding/json" "fmt" - "mijia-go-sdk" + "mijia" "testing" "time" ) @@ -12,12 +12,12 @@ func Test_login(t *testing.T) { user := "15542100924" pwd := "1XAII@wsk" - result, _ := mijia_go_sdk.Login(user, pwd) + result, _ := mijia.Login(user, pwd) _, err := json.Marshal(result) if err != nil { return } - Mi := mijia_go_sdk.NewMiJia(result) + Mi := mijia.NewMiJia(result) //Mi.Rooms() Mi.Devices() //Mi.Scenes(0)