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)