diff --git a/.gitignore b/.gitignore index eedd212..e313b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ public/* # logs store/logs/* -tmp/* \ No newline at end of file +tmp/ \ No newline at end of file diff --git a/test/insertAnimal_test.go b/test/insertAnimal_test.go index 32582a1..f053b69 100644 --- a/test/insertAnimal_test.go +++ b/test/insertAnimal_test.go @@ -36,13 +36,13 @@ const ( "Latitude": 30.532645, "Longitude": 114.367661, "Avatar": "1.jpg", - "AvatarHeight": 178, - "AvatarWidth": 118, - "HeadImg": "1.jpg", + "avatar_height": 178, + "avatar_width": 118, + "head_img": "1.jpg", "Photos": "", - "ActivityRadius": 100, + "activity_radius": 100, "Tags": "", - "NickName": "胖北,北子", + "nick_names": "胖北,北子", "face_breeds": "10,8,2", "face_breed_probs": "0.9,0.09,0.01" }, { @@ -56,11 +56,11 @@ const ( "Latitude": 30.532645, "Longitude": 114.367661, "Avatar": "2.jpg", - "AvatarHeight": 160, - "AvatarWidth": 213, - "HeadImg": "2.jpg", + "avatar_height": 160, + "avatar_width": 213, + "head_img": "2.jpg", "Photos": "", - "ActivityRadius": 100, + "activity_radius": 100, "NickName": "打人三花,小花", "Tags": "", "face_breeds": "10,8,2", @@ -76,11 +76,11 @@ const ( "Latitude": 30.532645, "Longitude": 114.367661, "Avatar": "4.jpg", - "AvatarHeight": 191, - "AvatarWidth": 160, - "HeadImg": "4.jpg", + "avatar_height": 191, + "avatar_width": 160, + "head_img": "4.jpg", "Photos": "0.png,1.jpg,3.jpg", - "ActivityRadius": 100, + "activity_radius": 100, "nick_names": "猜皮,猪", "Tags": "臭脸,猜皮,玉玉", "face_breeds": "2,6,4", @@ -97,11 +97,11 @@ const ( "Latitude": 30.532645, "Longitude": 114.367661, "Avatar": "6.jpg", - "AvatarHeight": 408, - "AvatarWidth": 306, - "HeadImg": "6.jpg", + "avatar_height": 408, + "avatar_width": 306, + "head_img": "6.jpg", "Photos": "", - "ActivityRadius": 100, + "activity_radius": 100, "face_breeds": "8,7,5", "face_breed_probs": "0.8,0.19,0.01" }]` @@ -161,7 +161,6 @@ func TestCreateAnimalList(t *testing.T) { } for _, animal := range animals { - fmt.Println("animal:", animal) animal := model.Animal{ Name: animal.Name, Birthday: animal.Birthday, @@ -184,8 +183,6 @@ func TestCreateAnimalList(t *testing.T) { Tags: animal.Tags, } - fmt.Println("TEST: ", animal.FaceBreeds, animal.FaceBreedProbs) - result := DB.Create(&animal) // 检查插入是否成功 diff --git a/tmp/runner-build.exe b/tmp/runner-build.exe index 98fbe11..3944808 100644 Binary files a/tmp/runner-build.exe and b/tmp/runner-build.exe differ diff --git a/tmp/runner-build.exe~ b/tmp/runner-build.exe~ index 1b8f07e..2b67cbb 100644 Binary files a/tmp/runner-build.exe~ and b/tmp/runner-build.exe~ differ