This commit is contained in:
eson
2023-09-22 14:34:23 +08:00
parent ec4fe76856
commit 4005af2040
3 changed files with 37 additions and 17 deletions

View File

@@ -157,10 +157,16 @@ func TestMain(t *testing.T) {
func TestCaseJSON_EXTRACT(t *testing.T) {
userProfile := &gmodel.UserProfile{
FirstName: "FirstName",
LastName: "LastName",
Resetaurant: "Resetaurant",
userProfile := &gmodel.UserProfileBase{
Base: struct {
FirstName string "json:\"first_name\""
LastName string "json:\"last_name\""
Resetaurant string "json:\"resetaurant\""
}{
FirstName: "FirstName",
LastName: "LastName",
Resetaurant: "Resetaurant",
},
}
metadata, err := json.Marshal(userProfile)
if err != nil {