You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
585 B

1 year ago
  1. package tag
  2. import "git.aiterp.net/rpdata2-take2/rpdata2/internal/genutils"
  3. type Update struct {
  4. ParentID *string `json:"parentId"`
  5. Name *string `json:"name"`
  6. Kind *Kind `json:"kind"`
  7. Listed *bool `json:"listed"`
  8. Secret *bool `json:"secret"` // Only owners can see it
  9. }
  10. func (t *Tag) ApplyUpdate(update *Update) {
  11. genutils.ApplyUpdateNilZero(&t.ParentID, update.ParentID)
  12. genutils.ApplyUpdate(&t.Name, update.Name)
  13. genutils.ApplyUpdate(&t.Kind, update.Kind)
  14. genutils.ApplyUpdate(&t.Listed, update.Listed)
  15. genutils.ApplyUpdate(&t.Secret, update.Secret)
  16. }