-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature: AutoMapper&Mapper support mapper struct to map[string]interface{} * Refactor: set MapperMapSlice to Deprecated, will remove on v1.0 * About AutoMapper:: ``` func Test_AutoMapper_StructToMap(t *testing.T) { from := &FromStruct{Name: "From", Sex: true, AA: "AA"} to := make(map[string]interface{}) err := AutoMapper(from, &to) if err != nil { t.Error("RunResult error: mapper error", err) } else { if to["UserName"] == "From"{ t.Log("RunResult success:", to) }else{ t.Error("RunResult failed: map[UserName]", to["UserName"]) } } } ``` * 2020-06-07 16:00 in ShangHai
- Loading branch information
Showing
5 changed files
with
74 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters