Skip to content

Feature: Added the "composite-field" tag to mapping composite fields

Compare
Choose a tag to compare
@devfeel devfeel released this 15 Apr 11:25
· 1 commit to master since this release

Version 0.7.13

  • Feature: Added the "composite-field" tag to continue expanding and searching for corresponding field mappings when encountering composite fields in a Struct. Currently, only one level of expansion is supported.
  • Tips: Thanks to @naeemaei for issue #39
  • For my birthday!
  • you can use like this:
  // Base model
  type BaseModel struct {
      Id    int `json:"id"`
  }
  
  // Country model
  type Country struct {
      BaseModel `json:"composite-field"`
      Name      string `json:"name"`
  }
  • 2023-04-15 19:00 in ShangHai